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
📦 Github Repository with the notes and exercise code+solutions: https://github.com/Nooder/react-in-depth
💬 Come join us on Discord to chat with a like-minded community about tech and learning: / discord
🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: / techwithnader
On this page of the site you can watch the video online Data Fetching - React In Depth with a duration of hours minute second in good quality, which was uploaded by the user Tech with Nader 31 August 2023, share the link with friends and acquaintances, this video has already been watched 1,079 times on youtube and it was liked by 72 viewers. Enjoy your viewing!