Skip to main content

One post tagged with "hooks"

View All Tags

Writing custom hooks in React

· 4 min read
Luke Owen
Lead Front End Developer @ Lunio

Hooks came into play in React 16.8, they allow you to manage state and side effects in functional components.

The default React hooks are pretty useful, but sometimes you’ll find yourself repeating the same logic, we can extract this into a custom hook and reuse it.