function Form () { return State({ user: Value({}), errors: Value({}), channels: { submit: submit } }) }
function Click () { return State({ greeting: Value('hello'), channels: { click: click } }) }
function Input () { return State({ message: Value('Type a message and hit enter'), channels: { submit: submit } }) }
function Input () { return State({ message: Value('Your message here'), channels: { submit: submit, input: input } }) }
function ApplicationRouter () { var state = Struct({ router: Router(), route: Value('404'), states: Varhash() }); Router.onNotFound(state.router, function () { state.router.active.set(null); }); return state; }