Aug 24, 2017 · 1 min read
Thanks that was some what helpful :)
But what would you do if you wanted to alias import tons of svg icon components with:
import * as Icons from ‘react-icons/lib/md’
This gives you MdMenu, MdSearch, … and I can automatically create a string with the component name based upon a const for each icon selected from the lib, but do i really have to map out each and all of the components in the components object to access it through the <MyComponent tag=”menu”>?
I know it is a lot to ask here but isn’t there a way to make use of React.CreateElement to create a new component on the fly with the name MdMenu or MdSearch object?
