DEV Community

loading...

Discussion on: What are some real-world scenarios where redux is needed?

Collapse
jsco profile image
Jesco Wuester Author

Interesting. I get the use case that you described above but I think in most cases that can be solved by structuring your components in a somewhat nicer way :D.
In my personal opinion, pure context has better dx than redux. I usually declare a provider like userProvider and a hook like useUser and then its pretty easy to consume the context.
I did use redux for nearly a year and in most cases it was just a burden, it came in handy once when I made a online photo editor but I figured that that's hardly a common use case :D

Collapse
fly profile image
joon • Edited

When I was refering to DX, I believe I might not have been specific enough. Yes I agree setting up redux is a pain and definitely has a steeper learning curve. And in that sense the DX is worse. The DX that I was referencing to was debugging code when projects get larger.
It can get increasingly difficult to do so as projects begin to get too large to even trace what's going on in where - especially when multiple developers are working on a single project.
In this scenario, redux is a god-send and I believe it has saved me countless hours of debugging because of redux's robust features when it comes to logging and debugging.
In small projects, I couldn't agree more that redux can feel a bit bloaty :)