Dynamic interaction is accomplished by changing the state of a component. We see and example of this by adding a filter bar to filter the tasks that are complete, vs the tasks still left todo.
setState to change a new piece of
filter state, and then use that to dynamically update the list of items without modifying the list in any way.
Summary of Content:
- Add a
Segmentfrom Native Base with three buttons
- Use those buttons to update a
filterkey in state
- Use that filter to dynamically change the list of items that is shown