*/ let node function render(view, withState) { patch(node, (node = view(withState))) } function view(state) { return ( <div> <h1>{state}</h1> <input autofocus type="text" value={state} oninput={e => render(view, e.target.value)} /> </div> ) } render(view, "Hello!")