https://github.com/colingourlay/chooet
All the goodness of choo, multi-threaded by duet.
https://github.com/colingourlay/chooet
Last synced: about 2 months ago
JSON representation
All the goodness of choo, multi-threaded by duet.
- Host: GitHub
- URL: https://github.com/colingourlay/chooet
- Owner: colingourlay
- License: mit
- Created: 2016-10-06T15:20:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T03:58:27.000Z (over 8 years ago)
- Last Synced: 2024-10-29T19:57:32.606Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/chooet
- Size: 9.77 KB
- Stars: 22
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chooet
All the goodness of [choo](https://github.com/yoshuawuyts/choo), multi-threaded by [duet](https://github.com/colingourlay/duet).
```js
const chooet = require('chooet');
const html = require('chooet/html');chooet(choo => {
app = choo();app.model({
state: { title: 'Not quite set yet' },
reducers: {
update: (data, state) => ({ title: data })
}
});const mainView = (state, prev, send) => html`
Title: ${state.title}
send('update', value.title)}}>
`;app.router(route => [
route('/', mainView)
]);app.start('body');
});
```