React-fontawesome: Forced `noAuto` makes it difficult to transition from Font Awesome 4 to 5

Created on 12 Mar 2018  路  5Comments  路  Source: FortAwesome/react-fontawesome

Today, we heavily use <i class="fa fa-user"></i> throughout an application. It's not feasible to update _all_ usages at once. It will take some time to convert all usages to the new React component. However, by importing the react-fontawesome package, it forces noAuto throughout the rest of the application.

Is there a way to opt-out or can an escape hatch be added? Is there a reason react-fontawesome forces no auto?

Source referenced:
https://github.com/FortAwesome/react-fontawesome/blob/9fe008e05c4308e1d12a53b7053998fc50f283e2/src/index.js#L4

Most helpful comment

Hey there, we are working on version 5.1.0 of FA which will fix this issue. We'll have a migration path that will mention this specifically. We expect to have this effort done soon (it's priority #1 for our dev team)

All 5 comments

Hey there, we are working on version 5.1.0 of FA which will fix this issue. We'll have a migration path that will mention this specifically. We expect to have this effort done soon (it's priority #1 for our dev team)

Any updates on this? At the moment, our site uses the <i /> elements everywhere, but we are launching a single page soon that has a react component built with react-fontawesome. The assumption that if React code is present anywhere on the page, that the site/app is rendered entirely via React (or is an SPA) is a terrible one to make. In this case, our application is largely a standard website, with a handful of areas that are more client-side heavy.

Currently, the presence of react-fontawesome breaks all of the non-react icons on our page. I understand that this was intentional with the "noAuto" call in react-fontawesome. Is there a technical reason why this is the case?

I suppose for now we'll need to yank out react-fontawesome entirely, as we can't have this issue blocking our scheduled release. It took this long to notice since all of our above-the-fold icons are inlined into our CSS.

Hey @nelsonlaquet,

We currently have some pre-release candidates out (we are calling them 5.1.0) that address some of the issues that you've been having.

We are doing the work (and documentation) on the development branch:

https://github.com/FortAwesome/react-fontawesome/tree/development

Would you be willing to give this a try? Check out the UPGRADING.md for detailed instructions.

Also remember that since this is a pre-release you need to use NPM tag @prerelease like:

$ npm i --save @fortawesome/fontawesome-svg-core@prerelease

Please let us know how the upgrade goes and if you run into any problems. We are working hard to get the 5.1.0 release stabilized.

Happy to re-open this if necessary. Just let me know.

Just quick note for others that installing the prerelase for react-fontawesome is what did it for me: npm i --save @fortawesome/react-fontawesome@prerelease

Was this page helpful?
0 / 5 - 0 ratings