Hacker News new | ask | show | jobs
by solardev 1377 days ago
Yeah, except... the technicalities make it seem like no, but in reality use context CAN replace redux a lot of times. The power of redux is often unnecessary (or just gets in the way, really), and context is enough.

Your post makes it seem like they are wildly different when in fact they often meet the same need. Use context is helpful precisely because it can replace redux in many situations.

It doesn't really matter how different they are under the hood. Redux is often used only as a global store of state, and context makes that much easier... even globally.

Maybe redux is good for some edge cases, but otherwise it's just overengineered bloat. Context is much more elegant and intuitive. There's no reason to force yourself to use the Flux pattern if you don't have to. I'd certainly never add redux to a project unless I absolutely needed to, it's such a pain...