An ES6 Flux library for ReactJS, providing a Flux dispatcher and Store base class with an immutable state tree. Version 1.1.10 (latest stable) includes core Flux and Store exports, plus sessionStorage helpers. The library emphasizes an Action-on-Store pattern with Immutable.js state management, offering event listeners on store updates. Requires Immutable.js as a peer dependency. Compared to alternatives like Redux, nl-flux is more opinionated and tightly coupled with Immutable.js, making it suitable for projects already using Immutable. Releases appear infrequent; check for compatibility with newer React versions.
npm install nl-fluxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Store with initial state, handling actions via onAction, registering with Flux, dispatching an action, and reading the immutable state tree.
Ensure the store class is registered via Flux.registerStore and the name matches the class name used in getStore.
Always return state in each case of onAction, even if no change: return state.
Ensure immutable version is compatible; test with immutable@3.x if issues arise.
Use 'import { Flux } from 'nl-flux'' and then 'Flux.getStore('storeName')'.Use 'import { Store } from 'nl-flux'' instead of 'import Store from 'nl-flux''.Check that the store is registered with Flux.registerStore(MyStore) and use the same name in getStore (defaults to class name).