From the Facebook React Native Text Input documentation, I was able to discern that this is what happens when onSubmitEditing
is used:
Callback that is called when the text input's submit button is pressed.
However, there wasn't anything for onChangeText
. I'm assuming if the text has changed, then it will trigger.
Why would I want to use one other than the other? For example if I'm making something that takes in text for the TextInput
field, wouldn't I just want to use onChangeText
? In some examples I've seen them use onSubmitEditing
and I'm confused on why you would use one over the other. This question is different than wondering how to make the submit button - I'm asking why I would use onChangeText
vs. onSubmitEditing
.