it is the state:
const[value, setValue]= useState();
it is the code:
<View style={styles.messaginginputContainer}>
<TextInput
multiline
style={styles.messaginginput}
onChangeText={txt => setNote(txt)}
value={value}
/>
<Pressable
onPress={()=>{
clearValue('');
}}
>
<View>
<Text style={{ color: "#f2f0f1", fontSize: 20 }}>ok</Text>
</View>
</Pressable>
</View>
i dont know how to do this functional
Ok, i can search a little bit more, but i want to enable the vote on my account
2
Answers
This question has answer here:
https://stackoverflow.com/a/45250198/13490165
create a button, then use
and clear like this:
The easiest way to clear any text input is by clearing the state like this :