1const [text, setText] = useState('');
2 const anotherFunc = (val) =>{
3 setText('');
4 }
5
6
7 return (
8 <View>
9 <TextInput
10 value ={text}
11 onChangeText ={changeHander}
12 placeholder = 'Add '
13 />
14 <Button
15 title = "Add Something "
16 onPress = {()=> {submitHandler(text) , anotherFunc(text)}}
17 />
18
19 </View>
20 )
21