Add blocks to state and rendering function