“What the heck are hooks?”

I found myself asking this just as I thought I had covered all the basis of React. Such is the life of a frontend developer, the game is always changing. Enter Hooks.

It’s always nice to learn something new right? Of course! But sometimes we have to ask ourselves “Why? What’s the point in this new thing? Do I have to learn it”?

With hooks, the answer is “not right away”. If you have been learning React, and have been using class-based components to date, there is no rush to move to hooks. Hooks are optional and can work in tandem with your existing components. Don’t you hate it when you have to rewrite your entire codebase to get some new thing to work?

Anyway, here are some reasons why hooks were introduced in the first place and why I recommend beginners should learn them.

#react #javascript #web-development

The Beginner's Guide to React Hooks
1.80 GEEK