Created
December 14, 2017 18:11
-
-
Save miwillhite/4272804273d6a145d775f4fcb1c54611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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