MCPcopy Create free account
hub / github.com/dabbott/react-native-express / App

Function App

examples/files/app/TodoListWithReducer.js:9–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { actionCreators, reducer, initialState } from './todos'
8
9export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected