December 2019
Intermediate to advanced
474 pages
10h 3m
English
Before you start adding styling to your React Native components, you need to fetch some data in your application that will be displayed by these components. Therefore, you will need to use life cycles to retrieve this data and add it to the local state of your application.
To fetch data, you'll use the fetch API again and combine this with the useState and useEffect Hooks to retrieve this data within the life cycles. Once the data has been fetched from the mock API, it can be displayed in a React Native FlatList component. Life cycle methods can be added to your React Native application using Hooks by making the following additions: