BO41 is right, this is a terrific javascript font that is not a render. If you are not using the new svg / javascript icons for fonts, you can use font-awesome as webfont with css.
In your index.html, remove the fontawesome script and add a stylish CSS stylesheet:
<link href="https://use.fontawesome.com/releases/v5.0.2/css/all.css" rel="stylesheet">
Your code should now work.
Another possibility is to use the official font fix pack (this is a bit more hassle, but it uses new svg icons)
Add the necessary packages for the project:
yarn add @fortawesome/fontawesome @fortawesome/react-fontawesome
yarn add @fortawesome/fontawesome-free-regular @fortawesome/fontawesome-free-solid
And updated code:
import fontawesome from '@fortawesome/fontawesome'
import FontAwesomeIcon from '@fortawesome/react-fontawesome'
import { faCircle as fasCircle } from '@fortawesome/fontawesome-free-solid'
import { faCircle as farCircle } from '@fortawesome/fontawesome-free-regular'
const Circle = ({ filled, onClick }) => {
return (
<div onClick={onClick} >
<FontAwesomeIcon icon={filled ? farCircle : fasCircle}/>
</div>
);
};
class App extends React.Component {
state = { filled: false };
handleClick = () => {
this.setState({ filled: !this.state.filled });
};
render() {
return <Circle filled={this.state.filled} onClick={this.handleClick} />;
}
}
. github : https://github.com/FortAwesome/react-fontawesome