Exercises: useEffect Hook - React In Depth

Published: 18 August 2023
on channel: Tech with Nader
2,423
126

Let's go through some exercises on the useEffect hook in React together.

We start with a warmup to practice a simple Counter component but with some effects to log on mount and on update.

Then we look at our first exercise where we setup a setInterval and manage its cleanup.

For the second exercise, we introduce multiple components and see how the interact together with useEffect.

To wrap up the video, we look at how we can fetch data from a REST API using fetch and useEffect.

Chapters:
00:00 Introduction
00:40 Warmup Exercise - Mount and Update
12:09 Exercise 1 - setInterval Cleanup
22:02 Exercise 2 - Multiple Components
49:59 Exercise 3 - Fetch Request REST API
1:09:21 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 Exercises: useEffect Hook - React In Depth with a duration of hours minute second in good quality, which was uploaded by the user Tech with Nader 18 August 2023, share the link with friends and acquaintances, this video has already been watched 2,423 times on youtube and it was liked by 126 viewers. Enjoy your viewing!