filmov
tv
Data Fetching - React In Depth

Показать описание
Let's learn about Data Fetching in React together.
We start with an overview on what it means to fetch data and the idea of remote data sources and how they integrate with our front-end React Components.
Then, we go through several examples of why a naive approach to fetching data won't work inside a React component and why we'll need to reach out for hooks such as useState and useEffect to solve this issue.
We look at several examples in code using the Pokemon API as our remote data API source and some errors we might run in to along the way.
Towards the end, we look at some strategies to handle Errors when dealing with data fetching as well as when and why to use 3rd party libraries to help solve some of the challenges with doing all this ourselves.
Chapters:
00:00 Introduction
01:19 Data Fetching Overview
03:29 Data Fetching Visual
07:13 Async Issues in Components
15:48 Potential Solutions to Async 1
17:37 Potential Solutions to Async 2
18:28 Potential Solutions to Async 3
22:08 An async solution with useState
30:18 Conditional Rendering no Data
33:41 Error Handling and Data Fetching
36:43 Data Fetching Libraries
40:26 Next Steps
We start with an overview on what it means to fetch data and the idea of remote data sources and how they integrate with our front-end React Components.
Then, we go through several examples of why a naive approach to fetching data won't work inside a React component and why we'll need to reach out for hooks such as useState and useEffect to solve this issue.
We look at several examples in code using the Pokemon API as our remote data API source and some errors we might run in to along the way.
Towards the end, we look at some strategies to handle Errors when dealing with data fetching as well as when and why to use 3rd party libraries to help solve some of the challenges with doing all this ourselves.
Chapters:
00:00 Introduction
01:19 Data Fetching Overview
03:29 Data Fetching Visual
07:13 Async Issues in Components
15:48 Potential Solutions to Async 1
17:37 Potential Solutions to Async 2
18:28 Potential Solutions to Async 3
22:08 An async solution with useState
30:18 Conditional Rendering no Data
33:41 Error Handling and Data Fetching
36:43 Data Fetching Libraries
40:26 Next Steps