Created
April 15, 2016 05:13
-
-
Save griffinmichl/cad6378457497ca7fa582f0fe2098b76 to your computer and use it in GitHub Desktop.
A saved Tricycle Program
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
const Cycle = require('@cycle/core'); | |
const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
const _ = require('lodash'); | |
const {Observable} = require('rx'); | |
const {restartable} = require('cycle-restart'); | |
// This looks a little different than normal. It's to enable support for cycle-restart, | |
// which automatically plays back your actions when the code reloads. | |
// See https://github.com/Widdershin/cycle-restart for more info | |
const sources = { | |
DOM: restartable(makeDOMDriver('.app'), {pauseSinksWhileReplaying: false}) | |
} | |
// Normally you need to call Cycle.run, but Tricycle handles that for you! | |
// If you want to try this out locally, just uncomment this code. | |
// | |
// Cycle.run(main, sources); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment