Skip to content

Instantly share code, notes, and snippets.

@miwillhite
Created December 14, 2017 18:11
Show Gist options
  • Save miwillhite/4272804273d6a145d775f4fcb1c54611 to your computer and use it in GitHub Desktop.
Save miwillhite/4272804273d6a145d775f4fcb1c54611 to your computer and use it in GitHub Desktop.
import { async, hold } from 'most-subject';
import reducer from './reducer';
const initialState = {};
// :: AsyncSubject
const store = hold(1, async());
// :: Action -> ()
export const next = store.next.bind(store);
// :: AsyncSubject State
export const state = store.scan(reducer, initialState);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment