Mid
4 października 2026Znajdź błąd: React Native
Jeden fragment kodu. Znajdź błąd albo udowodnij, że go nie ma.
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}Kliknij linie, które powodują problem.
Twój werdykt
Jedna próba dziennie. Odpowiedź pojawi się od razu potem.
Zachowaj swoją serię
Załóż konto, aby zachować serię i śledzić postępy.