Creating wrapper component
You can create the wrapper using props.children
Functional component
const WrapperComponent = ({ children }) => (
<Image source={someImage}>
{children}
</Image>
);
Class component
class WrapperComponent extends Component {
render() {
return (
<Image source={someImage}>
{this.props.children}
</Image>);
}
}
Whatever you'll put inside the <WrapperComponent></WrapperComponent>
tags will be rendered.