Reputation: 323
I installed react-create-app with npm and with npm I installed react-fontawesome. But how I can include css styles of fontawesome in my project?
Upvotes: 1
Views: 199
Reputation: 2721
Probably at the moment react-icons
is the best way of including FA icons into your app, as it only brings in those icons, which are used in your project, not all the icon sheet
https://gorangajic.github.io/react-icons/
import FaBeer from 'react-icons/fa/beer';
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
P.S. to answer your question..
this is what the docs of your react-fontawesome
say
The fastest way to get started is to import FontAwesome with a link tag in your page's :
<link
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet" />
Upvotes: 1