Once a user types input into a text box, we want to do something with that input. We'll use
setState to change the value of an array of items in the parent component.
Adding the item to that array using
setState will automatically re-render the components, and will show the new item in the list.
Summary of Content:
- Switch the
Formfrom native base
- Convert the hard-coded
itemsvariable to an array in state
setStateto add an item to an array without mutation
- Using react navigation and
goBackto navigate back in the stack