()
| 7 | import { actionCreators, reducer, initialState } from './todos' |
| 8 | |
| 9 | export default function App() { |
| 10 | const [state, dispatch] = useReducer(reducer, initialState) |
| 11 | |
| 12 | return ( |
| 13 | <View> |
| 14 | <Title>To-Do List</Title> |
| 15 | <Input |
| 16 | placeholder={'Type a todo, then hit enter!'} |
| 17 | onSubmitEditing={(title) => dispatch(actionCreators.add(title))} |
| 18 | /> |
| 19 | <List |
| 20 | items={state.items} |
| 21 | onPressItem={(id) => dispatch(actionCreators.remove(id))} |
| 22 | /> |
| 23 | </View> |
| 24 | ) |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected