check the state initially

render the view on load