Course lesson

Share Logic Across Multiple React Components with Custom Hooks

In React 16.6, there are hooks that allow you to use state in functions components in a simple way.

Duration
1 min
Access
Free
Transcript
Available

In React 16.6, there are hooks that allow you to use state in functions components in a simple way.

With these hooks, you can share the logic easily. In this lesson, we'll break out the setCount hook into it's own function and use it in a Component.