O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TextInput

The second goal for building out an MVP was as follows:

  • Our users should be able to input their own tasks using a text field and the native keyboard

To successfully create this input, we have to break down the problem into some necessary requirements:

  • We need to have an input field that will spring up our keyboard to type with
  • The keyboard should hide itself when we tap outside of it
  • When we successfully add a task, it needs to be added to dataSource in TasksList, which is stored in its state
  • The list of tasks needs to be stored locally in the application so that a state reset doesn't delete the entire list of tasks we've created
  • There're also a couple of forks in the road we should address:
    • What happens when the user hits ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required