Exercises: useRef Hook - React In Depth

Опубликовано: 08 July 2026
на канале: Tech with Nader
1,930
99

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

We start with a warmup to practice triggering the focus of an input element from a button click.

Then we look at our first exercise where we deal with different events and a video element.

For the second exercise, we take a look at how we can store state independent of the DOM but still use it in our logic with a number guessing game.

To wrap up the video, we look at how we can easily deal with forms using the useRef hook and the FormData Web API.

Chapters:
00:00 Introduction
00:41 Warmup Exercise - Input Focus
11:39 Exercise 1 - Video Element
27:09 Exercise 2 - Number Guessing
46:45 Exercise 3 - Forms
1:01:57 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