News for hackers. Stuff that matters.
Re:The new wave of React state management by ggregoire on Saturday July 02, 2022 @04:03PM (#31961870)
Exact same experience here. We were using Redux to manage server-side data and switching to React Query massively simplified everything. It appears that managing server-side data in an efficient way is an insanely complicated topic and React Query just solved everything about it that I can think of.
Re:The new wave of React state management by acemarke on Saturday July 02, 2022 @04:41PM (#31962173)
Yeah, both the React Query and Redux maintainers agree that you shouldn't be writing data fetching and caching logic yourself. That's why we recently added a new "RTK Query" data fetching and caching API to Redux Toolkit, so that if you're using Redux it handles that work for you:

- https://redux.js.org/tutorials/essentials/part-7-rtk-query-b...

- https://redux-toolkit.js.org/rtk-query/overview

and if you're just using React, definitely look at React Query.

Re:The new wave of React state management by buchanaf on Saturday July 02, 2022 @08:26PM (#31963831)
RTKQ is terrific. Between things like that and MUI, the level of productivity you can achieve really is amazing.

Also, thanks for your work -- really, really appreciate it.

Re:The new wave of React state management by ggregoire on Saturday July 02, 2022 @04:48PM (#31962242)
Yes we chose Redux 6 years ago for data fetching and caching when there wasn't as many alternatives as today!
Re:The new wave of React state management by acemarke on Saturday July 02, 2022 @04:55PM (#31962306)
Hah, yeah, the ecosystem landscape has definitely changed over the last few years :)