1.0.0 • Published 8 years ago

simple-flux v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Simple Flux

A simple flux implementation inpired by RiotControl.

Installation

npm install --save simple-flux

Quick Example

// mystore.js
import {Store, addStore} from "aflux";

const myStore = new Store();

myStore.on("my-action-1", ({param1, param2} => {
  console.log("my action 1");
}));

myStore.on("my-action-2", ({param1} => {
  console.log("my action 2");
}));

addStore(myStore);