Chooce video playback speed
speed:1

Create a Custom Hook in React by Wrapping useState

InstructorChris Achard

Share this video with your friends

Send Tweet

Custom hooks in React are functions, and we can write them by combining other, preexisting hooks.

In this lesson, we'll wrap the useState React hook to create a hook that automatically pulls out the event.target.value of an input's onChange callback. We'll then use that hook directly as the onChange prop of a text input.

This lesson is a Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.