hjertnes.blog

React in 2019

18.08.2019 11:10

The big thing going on in React this year is to move away from class based components to pure functional ones that use Hooks where it is possible. And if you are doing React development I recommend that you start doing this as soon as possible. You should at least get used to hooks.

I like hooks a lot better than I have ever liked class based components, and they are a lot easier to make re-usable. But they can be a little bit confusing in the beginning. Especially if you have not started using them yet.

My bet is that the React team will add hooks that solve the remaining things only class based components can do in the next couple of releases. What usually happens when something change to something new in React you usually get a couple of years before you start seeing warnings and then another year before it is gone. And it is a lot easier to deal with this kind of change if you start doing it early.