Re:React Fundamentals: What I’m Learning
by poyu on Tuesday November 03, 2020 @07:42PM
(#24985676)
What’s the reason to avoid class components though? The official tutorial still uses it, though that could just be because it’s outdated?
[ Parent
| on HN ]
Re:React Fundamentals: What I’m Learning
by acemarke on Wednesday November 04, 2020 @11:36AM
(#24990524)
The React team is currently working on a complete rewrite of the docs, which will include a focus on hooks first:
https://github.com/reactjs/reactjs.org/issues/3308
In the meantime, someone else ported the existing docs to teach function components and hooks in the examples:
Re:React Fundamentals: What I’m Learning
by ritchiea on Tuesday November 03, 2020 @08:17PM
(#24985857)
The zeitgeist is that hooks are easier to reason about than life cycle methods, functional components are more lightweight and result in less bundled code.
Re:React Fundamentals: What I’m Learning
by hitekker on Tuesday November 03, 2020 @09:35PM
(#24986140)
It's more of a hype train than a "zeitgeist". Major community contributors like Jared Palmer have stepped forward in the past year to critique the complexity of React hooks.
https://jaredpalmer.com/blog/react-is-becoming-a-black-box
https://dillonshook.com/a-critique-of-react-hooks-addendum/
Personally, I think blindly adopting the latest frontend trends is the opposite of being "radically pragmatic".