provide the whole state to the render function