useEffect.dev
← Back to lessons

Lesson 12Custom hooks to use the browser’s APIs

A thing you often need to do in React is access the browser’s APIs. These APIs represent side effects, and most of the time, you will want to store what they return in a local state: a perfect opportunity to write some custom hooks that you’ll be able to reuse across your applications.