added requestAnimationFrame polyfill moved raf logic into a subscription separated logic into multiple files, all state lives in a global namespaced model, reset no longer sends multiple actions only one
16 lines
272 B
JavaScript
16 lines
272 B
JavaScript
const choo = require('../../')
|
|
|
|
const stopwatch = require('./models/stopwatch')
|
|
const mainView = require('./views/main')
|
|
|
|
const app = choo()
|
|
|
|
app.model(stopwatch)
|
|
|
|
app.router((route) => [
|
|
route('/', mainView)
|
|
])
|
|
|
|
const tree = app.start()
|
|
document.body.appendChild(tree)
|