I have a component that I want to reuse, and in different instances, I want different icons that come with different tags "Entypo" and "AntDesign". I would like to switch them on type property. Here is the idea:
const tag = type === 'home' ? 'Entypo' : 'AntDesign';
<{tag} name='someName' />
But it doesn't go through. Is there something I am missing? Or is there another way?