Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React FontAwesomeIcon only works when icons are explicitly imported #546

Open
rwb196884 opened this issue Mar 10, 2023 · 1 comment
Open

Comments

@rwb196884
Copy link

<FontAwesomeIcon icon={['fab', 'twitter']} />

does not work, but

import { faTwitter } from '@fortawesome/free-brands-svg-icons';
...
<FontAwesomeIcon icon={ faTwitter } />

does.

@reinrl
Copy link

reinrl commented Jan 4, 2024

@rwb196884 Per the official documentation, you need to either use dynamic icon importing or add individual icons explicitly (what your second example above illustrates). Without one of these two options, I don't see how your initial example could work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants