const choo = require('choo') const app = choo() app.model({ state: { title: 'Set the title' }, reducers: { update: (action, state) => ({ title: action.value }) } }) const mainView = (params, state, send) => choo.view`

${state.title}

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