AI Workshop: learn to build apps with AI →
React Hooks
Master React hooks: useState, useEffect, useContext, useReducer, and more.

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


React Hooks revolutionized how we write React components. They let you use state and other React features in functional components, making code more reusable and easier to understand.

In this section you’ll master all the essential React hooks: useState, useEffect, useContext, useReducer, useCallback, useMemo, and useRef.

Lessons in this unit:

0: ▶︎ Introduction
1: Introduction to React Hooks
2: How to use the useState React hook
3: useEffect React hook, how to use
4: How to use the useContext React hook
5: How to use the useReducer React hook
6: How to use the useCallback React hook
7: How to use the useMemo React hook
8: How to use the useRef React hook
9: Can I use React hooks inside a conditional?
10: Why does useEffect run two times?
11: Using useState with an object: how to update
12: How to reference a DOM element in React