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
Auf dieser Seite können Sie das Online-Video Data Fetching - React In Depth mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Tech with Nader 31 August 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,079 Mal angesehen und es wurde von 72 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!