explaingit

facebookarchive/flux

Analysis updated 2026-06-24

17,469JavaScriptAudience · developerComplexity · 3/5Setup · easy

TLDR

Facebook's archived application architecture for React apps based on unidirectional data flow through Actions, Dispatcher, Stores, and Views.

Mindmap

mindmap
  root((flux))
    Inputs
      Actions
      View events
    Outputs
      Store updates
      Rendered UI
    Use Cases
      Legacy React apps
      Learning patterns
      Migration source
    Tech Stack
      JavaScript
      React
      Node
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Maintain an existing legacy React app that already uses Flux

USE CASE 2

Study unidirectional data flow patterns before adopting Redux or Zustand

USE CASE 3

Migrate a Flux codebase to a modern store like Redux Toolkit or Jotai

USE CASE 4

Use the standalone Dispatcher module in a non-React event bus scenario

What is it built with?

JavaScriptReactNode

How does it compare?

facebookarchive/fluxfoundry376/mailspringnfl/react-helmet
Stars17,46917,47517,478
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderateeasy
Complexity3/54/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Project is archived, the README points new users to Redux, MobX, Recoil, Zustand, or Jotai instead.

In plain English

Flux is an application architecture (a pattern for organizing how data flows through an app) originally created by Facebook for building user interfaces with React. It is now archived, meaning no further development will happen, and the project recommends newer alternatives. The core idea behind Flux is "unidirectional data flow," which means data always moves in one direction through your app rather than bouncing back and forth unpredictably. The pattern has four main parts: Actions (events that describe something happening, like a user clicking a button), a Dispatcher (a central hub that receives actions and passes them to the right places), Stores (where your app's data and business logic live), and Views (the UI components that display data from the Stores and trigger new Actions). By keeping data flowing in one direction, it becomes easier to understand and debug how your app's state changes over time. Flux is less a rigid framework and more a conceptual pattern. The repository provides a Dispatcher module and some utility classes to help you implement the pattern, but does not dictate the full structure of your app. It is written in JavaScript and was installed via npm. The README includes code examples showing how to create a Store using the provided ReduceStore base class, which handles state updates based on incoming actions. Since the project is archived, it is mainly of historical interest today. If you are starting a new project, the README directs you toward alternatives like Redux, MobX, Recoil, Zustand, or Jotai.

Copy-paste prompts

Prompt 1
Show me a minimal Flux example with one ReduceStore, an action creator, and a React view
Prompt 2
Map each Flux concept to its closest equivalent in Redux Toolkit and Zustand
Prompt 3
Write a migration plan from Flux ReduceStore to Redux for a 50-component app
Prompt 4
Use the Flux Dispatcher in a plain JavaScript app without React for a simple event bus
Prompt 5
Explain when Flux is still worth using in 2026 vs picking a modern state library

Frequently asked questions

What is flux?

Facebook's archived application architecture for React apps based on unidirectional data flow through Actions, Dispatcher, Stores, and Views.

What language is flux written in?

Mainly JavaScript. The stack also includes JavaScript, React, Node.

How hard is flux to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is flux for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub facebookarchive on gitmyhub

Verify against the repo before relying on details.