
React v16.13.0 - nnx
https://reactjs.org/blog/2020/02/26/react-v16.13.0.html
======
tony
Using react with hooks and typescript and wanted to report I'm happy with it.

The biggest changer to me was TypeScript and DefinitelyTyped covering pretty
much every package I end up trying out.

Hooks save a layer of indentation, and in most components, I don't need all
the class stuff. In addition I find it harder to manage renders in classes.

Some design decisions, like overextending use of redux-forms can be a pain to
back out of. Maintaining typings for these thing break often in my experience.
I'm trying to stay away from redux (the data store) in favor of managing stuff
through relay mutations.

Nice little comforts like prettier (code formatter) go a long way.

And apparently tslint is being deprecated in favor of eslint
([https://github.com/typescript-eslint/typescript-
eslint](https://github.com/typescript-eslint/typescript-eslint)).

Code splitting via React.lazy / dynamic imports working with minimal effort.

The other thing that has helped is webpack's API becoming more stable, editor
extensions getting better. I'm getting consistent linting and completion in
vim. Stuff is snapping together.

~~~
aphextron
Another +1 for Hooks. I was really against it at first, but now I'll never go
back. React components should really be nothing more than a view layer and
Hooks forces you to stop thinking in the component/class paradigm, which
generally makes things a lot more modular and reusable. I've been using XState
to handle business logic and MobX as a data store, leaving React to simply
render the data. No more huge class files and complicated life-cycle methods.

------
dzonga
I feel like React hooks even though they provide a concise way to write code.
they pushed react 2 decades back. classes had provided a standardized way to
do stuff in React land. Now you're going to have places where people use
hooks, others classes. n in my personal experience will result in different
testing strategies n unknown bugs. this is one of the reasons, I quit working
as frontend software engineer. just too much change

~~~
allthetime
How do you push a 6 year old piece of software 2 decades back? I know you're
exaggerating, but after admitting that you don't work with front end anymore
(so I'm assuming you haven't really worked with hooks for very long) it's hard
to understand why your opinion is of value here.

I've been working with React for 3+ years now and hooks are a major step
forward in terms of both productivity and writing clean, efficient, reusable
code. Anyone who spends some time wrapping their head around hooks realizes
this and from what I see, a large majority of react / react-native library
developers are on board as well.

Hooks can be adopted and implemented gradually along side class based
components without issue, and no one has trouble when both exist along side
each other. There is no rift in the react community because of this, and to
suggest there is just reveals your ignorance, it's only pushing things
forward.

~~~
rawoke083600
Best source for learning/grasping/getting-a-feel for hooks in your opinion ?

~~~
siquick
If you're familiar with React then [https://www.robinwieruch.de/react-
hooks](https://www.robinwieruch.de/react-hooks) or
[https://www.robinwieruch.de/react-hooks-
migration](https://www.robinwieruch.de/react-hooks-migration) or
[https://reactjs.org/docs/hooks-intro.html](https://reactjs.org/docs/hooks-
intro.html) are a good place to start

