How to get input text • React Native
In this article we will see how to get the user input text inside the <TextInput>, very simply.
In this example, we will be using a login page :
![](https://nicolasbaptista.com/wp-content/uploads/2019/04/image.png)
Add the reference for each TextInput at the top of your login class, inside the constructor :
![](https://nicolasbaptista.com/wp-content/uploads/2019/04/image-1.png)
Then, put the ref tag inside the each TextInput.
Attribute this ref tag to each variable that have been referenced. Here is the example with this.logInput :
![](https://nicolasbaptista.com/wp-content/uploads/2019/04/image-3.png)
Now you can get the value by using this.logInput.current._lastNativeText inside our code.