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
Icon not rerendering in react #11967
Comments
Duplicate of #11950. |
Yeah, this isn't the same thing unfortunately. It changes color fine, but it should be changing the icon as well. We worked out a fix by importing the CSS instead of relying on the CDN. But this is something that should probably be mentioned somewhere else! Edit: |
I'm seeing exactly the same thing as @blaynem-moovel . This isn't related to the issue this has been closed a duplicate of. Looking at the code @blaynem-moovel wrote, I'm doing something similar. His has
and mine has
The key here is that when React re-renders the My same code was working fine with Font Awesome 4, and this broke trying to move to 5. I'm using the JS-only approach. Moving to CSS appears to have fixed it for @blaynem-moovel , but I'd rather stay with JS as I moved for the tree-shaking. |
If you are using React make sure and use https://www.npmjs.com/package/@fortawesome/react-fontawesome instead or switch back to the web fonts with CSS version of FA5. |
@robmadole ty sir. |
I had this same issue. I found this helpful: https://stackoverflow.com/a/49667476/1807627 |
If you want a quick and dirty work around for this you could have something along the following:
A change in the |
Here's an example: https://codesandbox.io/s/m55100zjqy
Using the CDN. If you click an item in the table, the icon will not change however the colors will. The code to take note of is
The text was updated successfully, but these errors were encountered: