danawoodman / react-fontawesome

A React Font Awesome component.
https://www.npmjs.com/package/react-fontawesome
MIT License
668 stars 72 forks source link

icon does not change with state change #65

Closed drheinheimer closed 6 years ago

drheinheimer commented 6 years ago

I have very basic icon: a folder that should open or close depending on whether or not the item is active. My code looks like <FontAwesome className="fal fa-lg" name={this.props.active ? "folder-open" : "folder"}/> This results in the correct icon being rendered the first time, but when another item is activated, the icons do not change.

drheinheimer commented 6 years ago

Quick followup: This is not the right library to use. For FA5: https://github.com/FortAwesome/react-fontawesome

danawoodman commented 6 years ago

Yes, use the official library for Fa 5. Please note you can pass size=“lg” instead of class names.