Loading...

Writing a Custom Hook: useEventListener

2,086 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on May 18, 2020

Today we're going to be creating a custom React Hook, useEventListener!

React doesn't have a great way to create a global click handler, so we're going to be creating a custom Hook to fulfill our needs!

Follow along as we write some code!

Source code: https://github.com/hswolff/youtube/bl...

——

NEWSLETTER: https://tinyletter.com/hswolff/subscribe

PATREON: https://www.patreon.com/hswolff

TWITTER: https://twitter.com/hswolff

SITE: https://hswolff.com/

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...