const { html } = require('../') // title demo module.exports = { init: () => ({ model: 'my demo app' }), update: (model, action) => { switch (action.type) { case 'SET': return { model: action.payload, effect: action } default: return { model } } }, view: (model, dispatch) => html`

${model}

dispatch({ type: 'SET', payload: e.target.value })} />
`, run: (effect) => { switch (effect.type) { case 'SET': document.title = effect.payload } } }