I'm following this part of the tutorial on importing both solid and brands icons with subsetting.
import { library } from '@fortawesome/fontawesome-svg-core'
import { faStroopwafel } from '@fortawesome/free-solid-svg-icons'
import { faTwitter } from '@fortawesome/free-brands-svg-icons'
library.add(faStroopwafel, faTwitter)
When I try to use:
<FontAwesomeIcon icon="twitter" />
it throws this error and doesn't show any icon:
Could not find icon {prefix: "fas", iconName: "twitter"}
Shouldn't the prefix be fab? Am I doing anything wrong?
Well went to a similar issue and using this branch docs I saw the solution.
Should be using it like this:
<FontAwesomeIcon icon={["fab", "twitter"]} />
Most helpful comment
Well went to a similar issue and using this branch docs I saw the solution.
Should be using it like this: