VOOZH about

URL: https://thenewstack.io/flux-overview-react-state-management-ecosystem/

⇱ What the Flux? An Overview of the React State Management Ecosystem - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2016-08-24 09:22:14
What the Flux? An Overview of the React State Management Ecosystem
analysis,
Software Development

What the Flux? An Overview of the React State Management Ecosystem

Aug 24th, 2016 9:22am by Charlie Crawford
👁 Featued image for: What the Flux? An Overview of the React State Management Ecosystem
Feature image via Unsplash.

It has been a crazy few years for JavaScript! If we go back 10 years — or even fewer years than that — the JavaScript landscape looks nothing like it was before. Not only has JavaScript emerged as a viable backend programming language, but it continues to evolve; some would say it has been evolving too fast.

We can look back to 2015, or as many know it, the year of “React fatigue.” For a while, everyone was happy with Google’s Angular.JS framework, and the sense of rigor it brought to the wild west that is frontend programming. However, many grew dissatisfied with Angular for a variety of reasons.

One of the top issues many developers have with Angular is that it is a very opinionated framework; there is an angular way to do everything. When Facebook’s React came to the scene as a relatively small “view” library, many felt it was a breath of fresh air. As React has such a small scope, it was easily comprehensible, and developers would roll their framework consisting of React and other libraries.

This is where things started to turn sour, and an opposite but equally painful problem occurred: Too many decisions and unsolved problems. State management was one of the biggest areas that lacked proper solutions.

Vanilla React

In React the only state management primitives provided are immutable props and mutable state. As state is harder to reason about, React encourages you to use state ideally sparingly and focus your efforts on props.

If you have a component that requires a change, in most cases, you will throw that component out, and generate a new one with the required props. Those with knowledge of React’s virtual DOM will know there is a little bit more going on under the hood than this — in order gain performance optimizations — but conceptually this is what happens.

As such, React developers will isolate state higher up in their component hierarchy, and pass it down as props, letting the state flow from the top of the tree to the bottom. In many cases, this is quite elegant and frankly overlooked by developers eager to dig into the full React ecosystem.

Problems start occurring when the component tree gets tall, and you have components that are far from each other on the tree, and one component is not a descendant of another, AND both components depend on the same bit of state.

To put this in simpler terms, let’s say you have a navbar and a component that displays new messages. Inside that navbar, there is a component that will indicate if you have a new message. In this scenario, both the navbar component and the messages component will depend on the same state. Here, neither component is a descendant of the other, which makes managing the state more challenging.

To avoid having “multiple sources of truth” the correct thing to do in this case would be to store this shared state in the nearest common ancestor — or any mutual ancestor — and pass the state down as props from there.

For small to medium apps, this is an okay approach, but it is cumbersome with large applications, and there can be performance implications of having to locate the state higher up in the component tree.

For those who haven’t encountered this issue for themselves, this issue is one of the primary motivators for Flux, Redux, Relay, and related data management tools. They all take a different approach to solving this problem, but fundamentally they are all attempting to fix the same issue.

Instead of passing this state from a component down to the hierarchy, all these tools move that state to an external store or stores, depending on the state management tool. Then, while the mechanics are extremely different in all of the mentioned solutions, in each of these solutions components will declare a dependency on the store(s) they are interested in.

Whenever the store changes, these components will repull the data, and rerender their children. These “container” components as they are frequently called will pass the data from the store down to their children as props. In all of the above solutions, the role of vanilla React’s component state is marginalized.

An Army of Fluxes

Facebook’s Flux is the original state management library for React, although it is more of a pattern than a library or framework. While there is an NPM package for Flux provided by Facebook, its offerings are quite sparse, and most of the heavy lifting is left to the application developer.

One of the main ideas in Flux is that state should be publicly readable, but only be able to be modified in a loosely coupled way. Instead of React components calling some sort of setter method for the stores, components will instead create actions. All of the stores in the application will receive this action — via a centralized dispatcher — and then the store would determine for itself if it should update its state in response to that action.

There was too much boilerplate, and too many layers of indirection in the vanilla Flux implementation. This has lead to an abundance of Flux implementations.

These actions are simple JavaScript objects with a type property, and optionally additional payload information. If a store is interested in that action, it will update its state, and components subscribed to that store will rerender.

This architecture decomposes complex UI state dependencies to a simple system. If two UI components are interested in the same state, both will listen to the same store. Whenever there is an action that causes the shared state to change, both of these components will rerender in response to that change. While the underlying principles are fantastic, the implementation details of vanilla flux are a little difficult to wrap your head around. The centralized dispatcher seems unnecessary at first, and there is a lot of code that goes into making flux stores. All in all most developers felt.

Too Much Flux

There were too much boilerplate and too many layers of indirection in the vanilla Flux implementation. This has lead to an abundance of Flux implementations.

Many of these libraries have come and gone over the last year, but the kind-of-a-flux-but-not-a-flux Redux has emerged as a de facto standard in React applications. Instead of using dispatchers and event listeners, Redux relies on functional programming and immutability to power a singular store.

Another powerful state management option that is inspired by Flux, but detours quite a bit, is Facebook’s Relay framework. Relay relies on GraphQL and colocating data dependencies with the component. Be on the lookout for part two of this article where we will be taking an in-depth look into why these particular solutions are winning so much developer mindshare.

Feature image via Pixabay.

TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Vanilla.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.