import 'font-awesome/css/font-awesome.min.css';
<i className="fa fa-gear"></i>
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faExchangeAlt } from "@fortawesome/free-solid-svg-icons";
<FontAwesomeIcon icon={faExchangeAlt} />