Back to Browse

Exercises: useState Hook - React In Depth

3.6K views
Aug 17, 2023
1:10:44

Let's go through some exercises on the useState hook in React together. We start with a warmup to practice a simple Counter component. Then we look at our first example where we sync a text box to an h1 tag. For the second main exercise, we look at how a simple Form might work and some of the issues that arise if we try to solve them with just useState. We then look at an example using prop drilling where we pass props to a child component to use to manipulate state in the parent. To wrap up the video, we look at a bonus exercise to see an alternative syntax for the useState function and how and when it might be useful. Chapters: 00:00 Introduction 00:49 Warmup Exercise - Counter 14:34 Exercise 1 - Text Box 23:07 Exercise 2 - Form 43:50 Exercise 3 - Prop Drilling 55:25 BONUS Exercise - State Callback 1:08:44 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: https://discord.gg/K4nkugP7Gd 🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: https://www.patreon.com/TechWithNader

Download

0 formats

No download links available.

Exercises: useState Hook - React In Depth | NatokHD