Created
April 20, 2018 03:53
-
-
Save sliptype/2502aec764bb82afe4c15e98e2533627 to your computer and use it in GitHub Desktop.
Cycle App Snippet
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 xs from 'xstream' | |
// Intent | |
const intent = source => ({ | |
// Object of action streams | |
}) | |
// Model | |
const model = actions => { | |
// Return stream of state | |
} | |
// View | |
const view = state$ => { | |
// Return stream of DOM nodes | |
} | |
// Main | |
const main = sources => ({ | |
DOM: view(model(intent(sources.DOM))) | |
}) | |
export default main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment