Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via pnpm

flux 4.0.4

An application architecture based on a unidirectional data flow
Package summary
Share
0
issues
3
licenses
14
MIT
2
BSD-3-Clause
1
BSD-2-Clause
Package created
3 Sep 2011
Version published
21 Mar 2023
Maintainers
1
Total deps
17
Direct deps
3
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
14 Packages, Including:
asap@2.0.6
cross-fetch@3.1.8
fbjs-css-vars@1.0.2
fbjs@3.0.5
js-tokens@4.0.0
loose-envify@1.4.0
node-fetch@2.7.0
object-assign@4.1.1
promise@7.3.1
react@17.0.2
setimmediate@1.0.5
tr46@0.0.3
ua-parser-js@1.0.37
whatwg-url@5.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
fbemitter@3.0.0
flux@4.0.4

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
webidl-conversions@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of flux 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
fbemitter3.0.06.53 kBBSD-3-Clause
prod
fbjs3.0.577.71 kBMIT
prod
react17.0.272.94 kBMIT
prod peer

Visualizations

Frequently Asked Questions

What does flux do?

Flux is an application architecture specifically designed for React, focusing on a unidirectional data flow pattern. It has been instrumental in complex software development as it simplifies the interaction between various components. Please note that the Flux project has been archived, and no more updates will be made. Instead, it's recommended to use more evolved alternatives such as Redux, MobX, Recoil, Zustand, or Jotai.

How do you use flux?

To use Flux, you first need to install it as an npm module within your project. This can be achieved using the command npm install flux. The main entity of Flux not readily available elsewhere is the Dispatcher. This can be imported in your JavaScript file like:

const Dispatcher = require('flux').Dispatcher;

For using Flux utils, you can write something like:

import {ReduceStore} from 'flux/utils';

class CounterStore extends ReduceStore<number> {
  getInitialState(): number {
    return 0;
  }

  reduce(state: number, action: Object): number {
    switch (action.type) {
      case 'increment':
        return state + 1;

      case 'square':
        return state * state;

      default:
        return state;
    }
  }
}

Please be aware though, Flux is more of a pattern than a full-fledged framework and doesn't have any hard dependencies.

Where are the flux docs?

The Flux documentation, along with guides and examples, can be found on the archived GitHub repository located at facebook.github.io/flux. Here, you will find an in-depth overview, a guide to Flux concepts, as well as API docs. This extensive documentation will enrich your understanding of Flux and its efficient use. It's beneficial to go through these resources before diving into Flux to comprehend fully its unique data flow mechanism and associated methodologies.