Rendering code ported to a component-based approach