choo: add initial render

This commit is contained in:
Yoshua Wuyts
2016-05-11 13:51:17 +07:00
parent c28d37ac84
commit 48d43eaf09
4 changed files with 161 additions and 6 deletions
+8 -2
View File
@@ -24,10 +24,10 @@ const app = choo()
app.model('title', {
state: { title: 'my-demo-app' },
reducers: {
'update': (action, state) => ({ title: action.payload })
update: (action, state) => ({ title: action.payload })
},
effects: {
'update': (action, state) => document.title = action.title
update: (action, state) => (document.title = action.title)
}
})
@@ -59,6 +59,12 @@ document.appendChild(node)
## API
### choo
## Packages used
- __views:__ [`yo-yo`](https://github.com/maxogden/yo-yo)
- __models:__ [`send-action`](https://github.com/sethvincent/send-action),
[`xtend`](https://github.com/raynos/xtend)
- __routes:__ [`sheet-router`](https://github.com/yoshuawuyts/sheet-router)
## Installation
```sh
$ npm install choo