Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to clear text ibput after message sent react native

//you will need to retrieve the ref at your constructor using React.createRef:
//At constructor 
function: this.myTextInput = React.createRef();

//At render function:
<TextInput ref={this.myTextInput} />

//And then you can call
this.myTextInput.current.clear();
 
PREVIOUS NEXT
Tagged: #clear #text #ibput #message #react #native
ADD COMMENT
Topic
Name
8+7 =