Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Use React Hooks to Convert a Class Component to a Function Component


    React just announced a new Hooks(Introducing Hooks – React) proposal enabling React Function Components to handle state and side-effects, which was previously only possible with React Class Components. In this lesson, we will be using a prerelease of React to convert a React Class Component to a Function Component using hooks, and then at the very end we'll introduce a custom hook to simplify the component even further.