React-fontawesome: React - brands icon being imported with fas prefix

Created on 21 Jul 2018  路  1Comment  路  Source: FortAwesome/react-fontawesome

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?

Most helpful comment

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"]} />

>All comments

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"]} />
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathanazulay picture jonathanazulay  路  5Comments

johnnunns picture johnnunns  路  4Comments

mattgogerly picture mattgogerly  路  3Comments

v8tix picture v8tix  路  4Comments

skovy picture skovy  路  5Comments