Hey guys, what's up?
So, on on the past two weeks i shared two tips showing you how to use icons on a website with Font Awesome library and how to use icons without any library (tips 133 and 125). Today i want to show you how we can easily add icons on a React application 👍
To do this, we'll be using a library called 'react-icons'. This library is awesome because it let us use icons from different libraries ( FontAwesome, Typicons, Material Design Icons, DevIcons, and a bunch more) and it's super easy to use. I suggest you visit their website - react-icons.netlify.con - to browse through all the icons you can use.
We'll start by installing this library by doing ' npm install react-icons' on our project. Then, we just need to go a Component and import the icons that we want. We can this by writing ' import { someIcon } from 'react-icons/fa' ', where 'fa' is the icon library that we want to use. -
Now, inside our Component's return we just need to use that Icon as a component, so: '
Hope you liked this tip, have a nice one 😎✌️