Hooks up double-sided state to rendering.