export a renderComponent function