Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Add a Lifecycle Event with the useEffect Hook to a React Function Component

    reactReact

    React has provided the useEffect Hook to add side-effects to a Function Component. In this lesson, we'll add hooks to manage localStorage and listen to window keydown events. We’ll also unpack how to clean-up after these effects and also control how often they are executed.