Skip to content

Instantly share code, notes, and snippets.

@griffinmichl
Created April 15, 2016 05:13
Show Gist options
  • Save griffinmichl/cad6378457497ca7fa582f0fe2098b76 to your computer and use it in GitHub Desktop.
Save griffinmichl/cad6378457497ca7fa582f0fe2098b76 to your computer and use it in GitHub Desktop.
A saved Tricycle Program
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