const choo = require('../../') const html = require('../../html') const app = choo() app.model({ namespace: 'input', state: { title: 'my demo app' }, reducers: { update: (data, state) => ({ title: data.payload }) }, effects: { update: (data, state, send) => (document.title = data.payload) } }) const mainView = (state, prev, send) => { return html`

${state.input.title}

send('input:update', { payload: e.target.value })}>
` } app.router((route) => [ route('/', mainView) ]) const tree = app.start() document.body.appendChild(tree)