News for hackers. Stuff that matters.
Re:A Critique of React Hooks Addendum by dceddia on Thursday May 07, 2020 @01:06PM (#23105350)
The implication behind “we don’t use Redux, we use hooks” is that they’re using React’s Context API directly as a “store”. A component at the top level has some state, probably using the useReducer hook, that state is passed down using a Context Provider, and child components can access the data with useContext.

You can DIY a Redux imitation with hooks pretty easily but making it as performant as Redux is harder.

Re:A Critique of React Hooks Addendum by ricardobeat on Thursday May 07, 2020 @03:11PM (#23106965)
Indeed. IIRC redux itself tried that in an earlier version but reverted to a custom update / forced render mechanism due to performance bottlenecks with Context.
Re:A Critique of React Hooks Addendum by acemarke on Thursday May 07, 2020 @03:24PM (#23107121)
Yep. References with the details on what we tried to do in v6, and how we rewrote things in v7:

- https://github.com/reduxjs/react-redux/issues/1177

- https://blog.isquaredsoftware.com/2018/11/react-redux-histor...