5 ms·
> everyone is looking into trendy redux replacements now What's wrong with redux? I've been using it in my last 2 companies, it scales amazingly and I think th
by robertwt7 5y ago
> everyone is looking into trendy redux replacements now
What's wrong with redux? I've been using it in my last 2 companies, it scales amazingly and I think that's one of the stack in react that I'm comfortable with
- shepherdjerred 5y agoAt my last company (a FANG) it was deemed too complicated/hard to learn
- chenmike 5y agoI enjoyed it while I used it but my main issues with it were with the developer experience and how many files the logic was spread across: actions, action constants, reducers, etc. When you have to edit 4 different files just to add a loading flag then I feel like something has gone wrong. If it solves your problems and you’re happy though, no need to let anyone convince you to change!
- hajile 5y agoOn really big frontend apps, redux with 4 files becomes the easiest part of the day. It may be verbose, but it’s the one thing that all the other devs won’t be implementing in some weird, proprietary way.
- chenmike 5y agoRedux vs. jank proprietary solution aren't the only options. For instance, a lot of what people use Redux for is fetching and storing API data, or managing cross-component state. A combination of react-query[1] and React context does the same in a much more developer-friendly (IMO) way. Again, not advocating for anything, just important to know what the options are. [1] https://react-query.tanstack.com https://react-query.tanstack.com
- netvarun 5y agoYou should checkout redux toolkit and it’s sibling rtk query - it solves these problems you mentioned really well and has been a breeze to work on a complex app with multiple people. Also both of these libraries are from the official redux team. Just a really happy user and has helped me tame the state problem.
- bluedevil2k 5y agoCheck out my Redux Toolkit wrapper, I think it makes working with Redux incredibly easy - https://github.com/bluedevil2k/ruffle https://github.com/bluedevil2k/ruffle
- 8note 5y agoThe pushback I've gotten is that there's too much boilerplate. I really like the boiler plate though. Everything is very specific
- jatone 5y agoits global state with a bunch of ceremony. outside of things like the user session and feature flags its essentially useless and more error prone than its worth.
- josephcsible 5y agoIt makes the different parts of your app more coupled than they have any reason to be, and it requires a ton of boilerplate.
- handrous 5y agoIt's a bit bad if you're not using typescript—then it's entirely fine. It's a bit bad if you try to add a bunch of extra shit to it unless you really need that shit (e.g. Thunk). The terminology's kinda bad ("action" for "event", especially, which also gives us junk like "action creator") which can make it seem more complex than it is. (I mostly like it, for the record)