Skip to main content

I don't see any need to import all icons. You can import some icons in your app.jsapp.js like:

import {library} from '@fortawesome/fontawesome-svg-core'; import { faAngleRight, faArrowRight ... } from '@fortawesome/pro-light-svg-icons'; library.add(faAngleRight, faArrowRight, ...) 
import {library} from '@fortawesome/fontawesome-svg-core'; import { faAngleRight, faArrowRight ... } from '@fortawesome/pro-light-svg-icons'; library.add(faAngleRight, faArrowRight, ...) 

Then use it like:

<FontAwesomeIcon icon="fal fa-angle-right" /> 
<FontAwesomeIcon icon="fal fa-angle-right" /> 

or for dynamic use to any component (like button with icon) as prop:

<FontAwesomeIcon icon={icon} /> 
<FontAwesomeIcon icon={icon} /> 

I don't see any need to import all icons. You can import some icons in your app.js like:

import {library} from '@fortawesome/fontawesome-svg-core'; import { faAngleRight, faArrowRight ... } from '@fortawesome/pro-light-svg-icons'; library.add(faAngleRight, faArrowRight, ...) 

Then use it like:

<FontAwesomeIcon icon="fal fa-angle-right" /> 

or for dynamic use to any component (like button with icon) as prop:

<FontAwesomeIcon icon={icon} /> 

I don't see any need to import all icons. You can import some icons in your app.js like:

import {library} from '@fortawesome/fontawesome-svg-core'; import { faAngleRight, faArrowRight ... } from '@fortawesome/pro-light-svg-icons'; library.add(faAngleRight, faArrowRight, ...) 

Then use it like:

<FontAwesomeIcon icon="fal fa-angle-right" /> 

or for dynamic use to any component (like button with icon) as prop:

<FontAwesomeIcon icon={icon} /> 
Post Undeleted by MMysiv
Post Deleted by MMysiv
Source Link

I don't see any need to import all icons. You can import some icons in your app.js like:

import {library} from '@fortawesome/fontawesome-svg-core'; import { faAngleRight, faArrowRight ... } from '@fortawesome/pro-light-svg-icons'; library.add(faAngleRight, faArrowRight, ...) 

Then use it like:

<FontAwesomeIcon icon="fal fa-angle-right" /> 

or for dynamic use to any component (like button with icon) as prop:

<FontAwesomeIcon icon={icon} />