Ads Top

How to install font awesome in react?

 Install font awesome in react:

we need to install font-awesome in react project but how? So it’s very easy go-to on the cmd terminal on the vs code or go to the direct on the command prompt and use this command as below:

 

npm install --save @fortawesome/fontawesome-free

 

After then you will need to check on the package.json file as shown on :

"@fortawesome/fontawesome-free": "^5.15.4",

 

Means now it’s installed. Then we need to import on the index.js file as:

 

import '@fortawesome/fontawesome-free/js/all.js’

 

and go to the use section, where as you want to the project:

<i className="fab fa-facebook-square"></i>



No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.