Files
buuh/examples/http/views/main.js
T
Yoshua Wuyts 9e039ed561 architecture: use barracks
Changes
=======
- add hook handlers
- add effect composition
- add noFreeze option

Commits
=======
- fixup! fix toString()
- fixup! use assert instead of throw
- fixup! fix reducers
- fixup! work on done callbacks
- fixup! more callback work
- fixup! woooh fixed effects errs
- fixup! wrap up stuff
2016-07-02 16:00:26 +02:00

15 lines
396 B
JavaScript

const html = require('../../../html')
module.exports = function (params, state, send) {
const error = state.app.errors[0]
const title = state.api.title
return html`
<section>
<h1>${title}</h1>
<h2>Latest error: ${error}</h2>
<button onclick=${(e) => send('api:good')}>OK!</button>
<button onclick=${(e) => send('api:bad')}>Naughty</button>
</section>
`
}