FortAwesome / Font-Awesome

The iconic SVG, font, and CSS toolkit
https://fontawesome.com
Other
73.64k stars 12.19k forks source link

fort awesome for React instructions incorrect #14572

Closed reposman33 closed 5 years ago

reposman33 commented 5 years ago

Describe the problem

I have an app in React 16.7.0; According to the instructions in https://fontawesome.com/how-to-use/on-the-web/using-with/react I installed the following fort awesome packages: "@fortawesome/fontawesome-svg-core": "^1.2.13", "@fortawesome/free-solid-svg-icons": "^5.7.0", "@fortawesome/react-fontawesome": "^0.1.4", I used the igloo icon in a component's JSX as instructed But I did not see the icon. Instead in the console an error message for each occurrence was logged: Could not find icon iconName: "igloo" prefix: "fas"

What did you expect?

to see the icon

What version and implementation are you using?

Version: Browser and version: Chrome 71.0.3578.98

Reproducible test case

I install the 3 packages through npm; I add the following imports in the component where I want to use an icon

I use it as below in my JSX: <td><FontAwesomeIcon icon={faEdit} /></td>

Only then the icon shows up. This differs considerably from the instructions.

Bug report checklist

robmadole commented 5 years ago

Can you provide a reproducible test case using something like codesandbox.io of your original issue?