Allow render-component to take a function returning a component