reactjscreate-react-appreact-icons

how to import all icons in Material Design from react-icons


I could not find anywhere in the documentation and on google how to use

import * as MaterialDesign from "react-icons/"

in the render fonction.

Thank you for understanding.


Solution

  • To include all icons in one; You must use this code!

    import * as MaterialDesign from "react-icons/md";
    

    To use an icon: ( <MaterialDesign.IconName /> )

    <MaterialDesign.MdHelp />
    

    Note: Make sure you have installed the react-icons package!