title: How to make a specific button disappear permanently on React.js?
body: <p>I am trying to make a button disappear after clicking so that even if I go to a different component(different pages) it will stay that way.</p>
  <p>Here is the code:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;Button
    className=&quot;but&quot;
    variant=&quot;primary&quot;
    onClick={(e) =&gt; {
      const tr = {
        id: info.track.track_id,
        trackName: info.track.track_name,
        artistName: info.track.artist_name,
      };
  
      fetch('http://localhost:8000/blogs', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(tr),
      }).then(() =&gt; {
        console.log('blog added');
      });
    }}
    style={{ marginLeft: '6px' }}
  &gt;
    Mark
  &lt;/Button&gt;;
  </code></pre>