Upgrade from Version 6 to Version 7
Wondering how to upgrade your Font Awesome React component from Version 6 to Version 7 and use all the new fancy family styles? We got you covered.
1. Remove Older Versions
Section titled “1. Remove Older Versions”Remove any entries of react-fontawesome
and fontawesome-svg-core
packages from your package.json
or yarn.lock
file:
// these need to be removed "@fortawesome/react-fontawesome" "@fortawesome/fontawesome-svg-core"
2. Ready for Reinstallation
Section titled “2. Ready for Reinstallation”Next, head over to the Set Up with React guide. Take a moment to decide whether you’d like to install using a Kit Package (recommended) or SVG Icon Packages, and just follow the steps for the option that works best for you.
Optional: Updating Version 6 Pro Icon Packages
Section titled “Optional: Updating Version 6 Pro Icon Packages”All Version 6 icon packages are still compatible with the new react-fontawesome
and fontawesome-svg-core
packages.
However, if you’d like to upgrade to the latest Version 7 icon packages, simply follow the same steps as above: remove the existing icon packages from your package.json (and yarn.lock if applicable), then reinstall the Icon Packages.