(state, action)
| 2 | import { View, Text, TextInput } from 'react-native' |
| 3 | |
| 4 | function reducer(state, action) { |
| 5 | switch (action.type) { |
| 6 | case 'first': |
| 7 | return { ...state, first: action.value } |
| 8 | case 'last': |
| 9 | return { ...state, last: action.value } |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | export default function App() { |
| 14 | const [state, dispatch] = useReducer(reducer, { first: '', last: '' }) |
nothing calls this directly
no outgoing calls
no test coverage detected