DEV Community

Discussion on: Enhancing useReducer.

Collapse
 
ipshot profile image
Roman Zhernosek

Thank you for your feedback.
Yes, you are right, and that's what I'm talking about. The imperative Redux-like style to keep all data in state doesn't work well with declarative style like react-query does.
I like your suggestion to use context for propagate loaded data, it could be a good way.
About create own declarative data loader - not sure how to merge this 2 approaches that it looks good. It can be confusing when loader returns data and also put it somewhere in state automatically and calls re-render.

Collapse
 
tilakmaddy_68 profile image
Tilak Madichetti

i am not sure if i understood why you think redux is bad for reactjs