DEV Community


Posted on

Retrieve TextInput entered value on Button Click onPress in React Native

Post Link :

This post explains how to retrieve TextInput Layout component entered value in react native application with the help of state and props. TextInput is a basic component that allows the user to enter text. It has an onChangeText prop that takes a function to be called every time the text changed, and an onSubmitEditing prop that takes a function to be called when the text is submitted.

In this example we are entering and retrieving value TextInput layout entered value on button click and displaying the entered value on screen using Alert dialog box.

Download Source Code

Top comments (0)