Created
March 13, 2017 14:11
-
-
Save jonathontoon/ce54a6def4979c027e42b83a97d9d99c to your computer and use it in GitHub Desktop.
routers
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 choo = require('choo') | |
const html = require('choo/html') | |
const app = choo() | |
const MainView = (state, prev, send) => { | |
return html` | |
<section>Test1</section> | |
` | |
} | |
const ProjectView = (state, prev, send) => { | |
return html` | |
<section>Test2</section> | |
` | |
} | |
app.model(require('./model')) | |
app.router([ | |
[ '/', MainView ], | |
[ '/project', ProjectView ] | |
]) | |
const tree = app.start() | |
document.body.appendChild(tree) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment