Facebook Flux architecture implementation based on self dispatching actions and commands
Last updated a year ago by jbpin .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install sinux 
SYNC missed versions from official npm registry.


Sinux is a Facebook Flux architecture implementation inspired by signal-as3 and SignalMapCommand extension for Robotlegs. Sinux use co library

npm version npm downloads Join the chat at


Visit the book, Sinux, a flux implementation based on signal to see the documentation and examples.

Philosophy behind Sinux

Read this article on Medium


Sinux is available on NPM

npm i sinux
yarn add sinux


Since version 0.2.0 Command objects are deprecated. Command are simple javascript function that can return a result or a function (see async below).

Using babel6 with es2015

import { Store } from sinux

const store = new Store({ initialState: true }, 'action','action2');

store.action.add( (state, ...args) => {...state, ...args} );

store.action({ foo:'bar' }).then( () => console.log( store.getState() ) );
// {initialState: true, foo: 'bar'}

Using ES3

var sinux = require('sinux');

var Store = sinux.Store;

var store = new Store({ initialState: true }, 'action','action2');

store.action.add( function (state) {
  // ...

store.action({ foo:'bar' }).then(function () {

Asynchronous command

// using generator function
store.action.add( (state, ...args) => {
  return function *(){
    let r = yield store.action2(...args)
    return r

// using Promise
store.action.add( (state, ...args) => {
  return new Promise((resolve, reject) => {
    setTimeout(()=> resolve(...args), 1000)

Exemple using Sinux with React Native

Here is a simple todo app made with Sinux and React Native. todoStore.load show how to do asynchronous call View source



Maintainers (1)
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 0
Last Month 23
Dependencies (2)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2016 © |