I introduced Redux into an app with an older version of React, and instead of updating decided to reimplement the important parts of `react-redux` as a shim. Didn't take long, and it was a satisfying education.
Just went through this myself, and that was exactly my experience. Really glad I spent time working with React so I knew what Redux would be great for before I tried to learn it.
Yeah, personally I use it - I think it hits the sweet spot of making simple things simple while still allowing for complexity perfectly.
It's a shame I can't really teach it, however - the fact is, it doesn't have enough mindshare right now and part of the reason people take courses is to learn marketable skills. For better or for worse, nearly every React shop is looking for devs who know Redux.
I will admit I am a terrible programmer, but I will say using Redux scared me away from using React at first.
Maybe my React needs are minimal, but I tried following a tutorial using React and Redux and I was immensely confused. Once I struck out on my own and ditched Redux for just straight React, everything became so much clearer and simpler.
I wasn't aware that your syntax has changed, thanks for the heads-up! I inherited an older codebase and found Redux to be the single most complicated part of a relatively straightforward app, and was turned off by what seemed like needless overengineering for relatively simple use cases. I could see the power behind Redux and ReactJS but it was frankly overkill for what we needed.
I will definitely check out your links when I get back to work next week. Thank you for sharing!
This is great. One of the biggest hurdles is getting started which is why there are so many react boilerplates. It would be awesome to see projects like this grow so that it would auto configure based on libraries you would like to use. Want to use Redux? Just run the `create-react-app -m redux hello-world ` and you would get everything with the addition of redux and it's configuration.
I like this article. It's probably a good idea to build your own simple todo app using Redux from scratch first, and then follow this guide. It would make a lot more sense.
Using this as a place to put some thoughts on Redux after having picked it up over the past few weeks.
I have been spending the least few weeks re-writing an "offline-first" mobx React app into Redux, after it started spinning out of control and becoming unmanageable. Mobx provided a lot less guidance on how to structure a larger app (read: more than a few pages with non-trivial remote interactions)
Like React itself, it took me a few weeks to grok the philosophy and architecture, and internalize the key components so that I wasn't getting lost every few lines of code.
I had evaluated Elm earlier in the year but passed on it, as there were some interop issues, and the component ecosystem wasn't as mature as react.
Redux has had the effect of organizing my code and helping me reason about the structure, as well as providing time travel for free.
Typescript to be very helpful when building with Redux, specifically when I did something wrong, and had to refactor.
I've also been pleasantly surprised at the middleware ecosystem, and how useful and easy to configure it has been.
Thanks for your work on it. I've found Redux super-helpful and pleasant to use for multi-platform JS UI work, in particular, to bundle HTTP client (and other network services, if not in the browser) libs behind a common, small, well-understood-by-React-devs state interface. I'm a huge fan of dependencies I can abuse—fake-up in an afternoon on unsupported platforms in another language, rip out of one place and cram in another without a fuss, stuff like that. Redux is one of the rare deps in JavaScript I never feel queazy about including in a build.
I'm too out-of-the-loop these days to know what Immer is, will have to give it a look.
I did exactly the same, First build a web app using ReactJS + Redux and once i was comfortable with it, i tried porting it to React-Native. Helped me understand these one at a time.
When I say "replace Redux", I by no means intend to imply that I want to oust it. Redux is awesome, and it's the king of the hill right now.
I just found myself a bit fed up with the amount of boilerplate involved in wiring Redux to React, and so I set out to create something that was easier to use and understand.
I'm interested in any suggestions, advice, and opinions people have for it. This is my first time creating a project with the intention to maintain it - so I'm eager to see what becomes of it!
I'm a Redux maintainer. I'm really excited about the changes in this release. They're primarily internal, but it should help React-Redux work a lot better with React's changes down the road.
In case anyone's wondering, this _should_ be a drop-in release for most users. Just bump your package version and update. If you do run into any problems, please file an issue!
I recently wrote a blog post that goes into more details on how the implementation has evolved over time, and why we changed several aspects of behavior for this release:
However, my approach was to start with an more-or-less small project with react / redux / typescript. In the beginning it was a pain, but now it works.. mostly.
As someone who has worked daily with React (and Django) for more than 5 years, I am always surprised to see how many boilerplates and tutorials include redux.
It’s a tool that solves very specific issues that most people won’t have and often adds quite a bit of complexity.
This is a very helpful guide for someone fairly new to the React ecosystem.
We're ripping out Redux from an older React app and I had the fear we'd end up re-adding it because we needed some of its features again, and this helped me understand that... well yeah, we probably land on the "Redux might be warranted" side of things, but it'll probably take us a few more months to realize it!
I remember there being about 5 layers of abstraction to using Redux. Every time you change something have to update 5 or 6 files. It really gave me Angular 1 vibes.
One thing I learnt from all these JS libraries and Node is that nothing is for free. If it seems too easy, then something gonna bite you in the ass down the line.
I failed on the trap as well, I mean, why would you want to add yet another 'concept' to your stack when you can just get a simpler piece of code do the same thing as a more complex one?
The truth is that if you're going to build something as simple as a simplified Hacker News clone, you can just get along using concepts of Redux with plain-old React without actually using Redux.
However, if you want to build a much more complex frontend system using Redux does give you a utility.
reply