TextInput - it is the main component that allows the user to enter text. It is the basic component for entering text into an application using the keyboard. Props provides customization options for several features such as autocorrect, auto-capitalization, placeholder text, and various keyboard types such as the numeric keypad. It has an
onChangeText property that accepts a function called whenever the text changes, and a
onSubmitEditing property that accepts a function called when the text is submitted. For now, ignore the
useState hook, it is used to change the state of the application, we will get to know it more in the next series.
In this example, we keep the text in state because it changes over time.
There are many more things you can do with text input. For example, you can check the text inside while the user is typing. For more detailed examples, see the TextInput reference documentation.
Entering text is one of the ways the user interacts with the application. Then let's look at a different type of input and see how to handle touches.
The main component that allows the user to enter text?
What is the name of the component's TextInput property, which takes a function that is called every time the text changes?
What is the name of the component's TextInput property that accepts a function called when text is sent?
Thanks goes to these wonderful people (emoji key):