I need to dynamically insert some Material UI icons into my code based on some string found in a configuration file. I found a technique that should work here: https://medium.com/@Carmichaelize/dynamic-tag-names-in-react-and-jsx-17e366a684e9
However, when I tried it for React Functional Components + Typescript I get weird errors:
How would I achieve this using Typescript? The types really throws me off.
Essentially, I would like to use this component like such:
<ListItemIcon>
<SideNavIcon name='dashboard' />
</ListItemIcon>
<ListItemIcon>
<SideNavIcon name='transform' />
</ListItemIcon>