New Quest: Refactor React Class Components With ”Hooks of Change”

New Quest: Refactor React Class Components With ”Hooks of Change”
Written by
Wilco
October 6, 2022
Tags
Wilco

If you’ve been working with React for a while, chances are that when you started, you were using class components to track the state and lifecycle of a component. Then React 16.8 came along, and with it, Hooks. No longer were functions stateless — you could track their state from within them. 

But while it’s been a few years of Hooks and classes coexisting, we know there are many of you who still work with legacy code and haven’t had the opportunity to explore Hooks. Especially since Meta has no plans to retire class components — they’re going to live alongside Hooks for the foreseeable future — there’s no urgency here.

Enter our new quest, Hooks of Change. Want to explore Hooks but don’t have anything to refactor, or just prefer not to mess with your existing code? Now you have an opportunity to do so! In this quest, you’ll be asked to refactor an existing app, and by doing so, will understand how React Hooks work and how they’re different from class components. 

So what are you waiting for? Start refactoring now.