I would prefer if we had a general function somewhere that does this conversion that is used in both render() and renderComponent()