DEV Community

Redux - Not Dead Yet!

Mark Erikson on March 29, 2018

I'm a Redux maintainer. There's been a lot of confusion, claims, and misinformation about Redux going around lately, and I want to help clear thing...
Collapse
 
ben profile image
Ben Halpern

Really great post Mark. It's amazing how frenzied people can become sometimes. As someone who was involved in React before Redux and used it a bit but then moved away from JS entirely for a while, I was amazed that when I got more engaged in this world that some people didn't even realize you could user React without Redux. And frankly I had to check that I hadn't missed something myself.

I'm curious though how you think about the lifespan of something like Redux compared to other projects. Backend frameworks seem to stick around forever. What do you think typically shortens the lifespan of frontend frameworks and glue-libraries? Is it innovation, mania, or simply a natural part of the domain?

Client build tools also have a tendency to be short lived or are susceptible to the consistent rumors of their demise.

Collapse
 
markerikson profile image
Mark Erikson • Edited

(Caveat: I barely know what I'm talking about here :) )

Well, backend frameworks come and go some too :) About a year and a half ago, I did a talk on the evolution of web dev technologies, and one of the slides had a timeline of new frameworks and toolkits. It's a mixture of front-end and back-end stuff, but there's a fair amount of churn on both sides :)

I think building client-side apps is uniquely complex in a lot of ways. Browser differences, the limitations of JS as a platform, and the constraints of downloading the entire app every time you load a page make building web apps that work for a large diverse userbase pretty difficult (something I'm sure you've seen for yourself building Dev.to ).

Besides, it's not just web apps. For fun, try counting the number of UI frameworks and data access frameworks Microsoft has put out, or look at the ways that programming on Linux has changed over the years (and all the cruft that's built up as a result). And really, there's a lot of parallels there. An autoconf.sh is basically like Modernizr or a babel-preset-env, and Webpack+Babel are basically a compiler and linker.

I think the biggest factors are a combination of:

  • The broad availability of the web making it a desired target for developers
  • The simultaneous rapid improvement in browser capabilities and fragmentation in browser versions in use
  • The web development community experiencing accelerated evolution as we get up to speed tool-wise and language-wise with what native development has had for years.

TL;DR: everyone's figuring it out as we go, and ideas are rapidly cross-pollinating.

I do think that React and Redux are a sort of "local maxima". They're not perfect, but they give you a whole lot better approach than most of what's come before. For something to really displace them, it'll have to be noticeably better in a lot of ways.

Collapse
 
reactiveintent profile image
Mvsica Donvm Dei • Edited

I'm just amazed that no one can think themselves out of the Redux rut. All frameworks have some variation on the same theme, no innovation just herd mentality it seems. The two forces that helped me escape the dead weight of Redux were: how my own complex app needs to work and RxJS.

Collapse
 
kayis profile image
K

I still don't understand why RxJS and the like didn't catch on.

Collapse
 
reactiveintent profile image
Mvsica Donvm Dei

Well, this is it exactly. Redux is a no brainer, good for simple stuff but gets you stuck in the weeds otherwise. While RxJS requires thought and is the perfect step up for those who dare to think beyond the switch statement.

RxJS has caught on some time ago. Angular has it as a major dependency, Vue has Vue-Rx and the React devs have been all over RxJS for sometime.

I hear you though, what is difficult is unlearning the past so you can be part of the future!

Collapse
 
lukewestby profile image
Luke Westby

my own estimates are that somewhere between 50-60% of all React apps use Redux

Can you share how you measured this?

Collapse
 
markerikson profile image
Mark Erikson

Sure. I collected these stats for use in my ReactBoston talk on the Redux ecosystem last September. Specifically, see this slide in the presentation.

Collapse
 
lukewestby profile image
Luke Westby

Neat, thank you!

Collapse
 
rhymes profile image
rhymes

I've never used neither React nor Redux but I really liked your post. I think being part (and in your case being a leader) of such a huge ecosystem will make you encounter FUD, inevitably. The very fact that many people are using React and Redux without even being sure if they need all that power it's probably a child of that mentality. Kudos to you and the team for developing such a project and for keeping it relevant.

If Redux won't survive the the test of time and the ecosystem evolution (a Shinkansen basically!!), well..., it happens to the best of projects but there is no need to cut other people's legs because you don't agree with this or that technical decision.

I started programming as a teenager (hello, Object Pascal!) and I'm certainly guilty of having been a smart-ass or spreading FUD in this or that mailing list.

Well, it helps no one.

Good luck for the project!

Ps. I feel like Jeff Atwood's rule about everything being eventually written in JS should be adapted to React 🀣

Collapse
 
rapasoft profile image
Pavol Rajzak

Maybe a bit off-topic, but hopefully still relevant: I always took React for component-building library and that's how I used it mostly. But there's a really great misconception, especially because novice developers are frequently asking questions "Should I learn React or Angular?" as if those were equivalent.

Collapse
 
albinotonnina profile image
Albino Tonnina

Great article Mark!
Needed, especially if coming from people directly involved in the project.

Collapse
 
debugging profile image
Salman Ahmed

I haven't shipped my react redux app yet and it's already absolute. Welcome to front end development! j/k

Collapse
 
chadsteele profile image
Chad Steele

I'd love it if you wanted to dissect my Redux one line replacement hook... useSync
dev.to/chadsteele/redux-one-liner-...