title: How to write to text file in React
body: <p>I have a text file called <code>certs-list</code> with a list of domain names in the format:</p>
  
  <pre><code>www.google.com
  www.facebook.com
  www.youtube.com
  </code></pre>
  
  <p>This file is then read in a script which generates a JSON file with information about these domain's SSL certificates.<br>
  This JSON file is then read by my NodeJS back-end in the GET API and the information is displayed in a table in my React app.</p>
  
  <p>I want to be able to click a button in my React app to delete a row from my table and delete the corresponding entry from <code>certs-list</code> so that it is no longer displayed in my table.</p>
  
  <p>For example deleting the Youtube row would update <code>certs-list</code> to:</p>
  
  <pre><code>www.google.com
  www.facebook.com
  </code></pre>
  
  <p>and then the next time the JSON is built there would only be entries for Google and Facebook.</p>
  
  <p>I tried using <code>fs.writeFileSync</code> but discovered that React does not have this function. Is there another function I can use to write to (delete entry from) <code>certs-list</code>?  </p>