docs: bump

This commit is contained in:
Yoshua Wuyts
2016-05-11 13:52:31 +07:00
parent 48d43eaf09
commit 14bf553e66
+5 -5
View File
@@ -24,14 +24,14 @@ const app = choo()
app.model('title', { app.model('title', {
state: { title: 'my-demo-app' }, state: { title: 'my-demo-app' },
reducers: { reducers: {
update: (action, state) => ({ title: action.payload }) 'update': (action, state) => ({ title: action.payload })
}, },
effects: { effects: {
update: (action, state) => (document.title = action.title) 'update': (action, state, send) => (document.title = action.title)
} }
}) })
const mainView = choo.view((state, send) => ` const mainView = (params, state, send) => choo.view`
<main class="app"> <main class="app">
<h1>${state.title}</h1> <h1>${state.title}</h1>
<label>Set the title</label> <label>Set the title</label>
@@ -40,14 +40,14 @@ const mainView = choo.view((state, send) => `
placeholder=${state.title} placeholder=${state.title}
oninput=${(e) => send('title:update', { payload: e.target.value })}> oninput=${(e) => send('title:update', { payload: e.target.value })}>
</main> </main>
`) `
app.router((route) => [ app.router((route) => [
route('/', mainView) route('/', mainView)
]) ])
const node = app.start() const node = app.start()
document.appendChild(node) document.body.appendChild(node)
``` ```
## Concepts ## Concepts