title: Getting error on React JS while using fontawesome 5 Error: Could not find icon ObjecticonName: "faHeart"prefix: "fas"
body: <p>I am trying to add fontawesome icon on my react js project but getting an error.</p>
  <pre><code>npm version: 8.1.4
  node version: 17.2.0
  
  ├─┬ @fortawesome/react-fontawesome@0.1.16
  │ └── react@17.0.2 deduped
  ├─┬ @testing-library/react@11.2.7
  │ └── react@17.0.2 deduped
  ├─┬ react-dom@17.0.2
  │ └── react@17.0.2 deduped
  ├─┬ react-icons@4.3.1
  │ └── react@17.0.2 deduped
  ├─┬ react-scripts@4.0.3
  │ └── react@17.0.2 deduped
  └── react@17.0.2
  </code></pre>
  <p>I want to add two heart icons on my project. One is solid and one is regular. The code is for the heart icons are:</p>
  <pre><code>&lt;i class=&quot;far fa-heart&quot;&gt;&lt;/i&gt;
  &lt;i class=&quot;fas fa-heart&quot;&gt;&lt;/i&gt;
  </code></pre>
  <p>On my react.js project, a class component I have declared named Like, and the code is shown below:</p>
  <pre><code>import React from 'react';
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
  import { faHeart } from '@fortawesome/free-regular-svg-icons';
  
  class Like extends React.Component {
    render() {
      return &lt;FontAwesomeIcon icon={['fas', 'faHeart']}&gt;&lt;/FontAwesomeIcon&gt;;
    }
  }
  
  export default Like;
  </code></pre>
  <p>I get this error: <code>Could not find icon {prefix: 'fas', iconName: 'faHeart'}</code></p>
  <p>If I use <code>return &lt;FontAwesomeIcon icon={faHeart}&gt;&lt;/FontAwesomeIcon&gt;;</code> then it solved but I need to add the two icon ones prefix is <code>fas</code> and ones is <code>fas</code>.</p>
  <p>How can I do that? Please help me. I am new to React.js.</p>