A React Native component will fire several different lifecycle methods as it mounts, props change, and is unmounted. It's useful to tap into those lifecycle methods to do certain things, like loading a list of todo items.
We'll explore lifecycle methods by loading a fake list of todo items when a component mounts.
Summary of Content:
- What lifecycle methods are
setTimeoutto simulate a network call to fetch todo items
- Add an
ActivityIndicatorspinner while the items are loading