Hooks Course - The Complete React Native
return ( <View> <TextInput placeholder="Enter your name" value=name onChangeText=setName style= borderWidth: 1, margin: 10, padding: 8 /> <Button title="Submit" onPress=() => setSubmitted(true) /> submitted && <Text>Hello, name!</Text> </View> );
return <TextInput ref=inputRef placeholder="Auto-focused" />; The Complete React Native Hooks Course
import useSelector, useDispatch from 'react-redux'; function TodoList() const todos = useSelector(state => state.todos.items); const dispatch = useDispatch(); return ( <
