Medior
4 oktober 2026

Vind de bug: React Native

Eén stukje code. Vind de bug, of bewijs dat er geen is.

tsx
1import { Alert } from 'react-native'
2
3type Status = 'idle' | 'loading' | 'success' | 'error'
4
5export function notify(status: Status) {
6  switch (status) {
7    case 'loading':
8      Alert.alert('Loading...')
9    case 'success':
10      Alert.alert('Done!')
11      break
12    case 'error':
13      Alert.alert('Failed')
14      break
15    default:
16      break
17  }
18}

Klik op de regels die het probleem veroorzaken.

Jouw oordeel

Eén poging per dag. Het antwoord verschijnt direct daarna.

Behoud je reeks

Maak een account om je reeks te behouden en je voortgang te volgen.

Account aanmaken