I'm trying to use fontawesome in React in css content and getting blank square instead of the icon. When using normally with html tag, it's working properly.
I installed the npm react-fontawesome and also pasted the cdn in my public index.html. I do prefer to use it in the old way (such as with pure js) and the normal html tags are working.
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
css:
.answer-selected::before {
font-family: FontAwesome;
content: '\f00c'
}
Same icon is working as a html tag:
<i class="fas fa-check"></i>
Any ideas? Thanks in advance