title: How to read file in React js?
body: <p>i want to read csv file in reactJS. i am trying file system ('fs') but it is not working. </p>
  
  <p>Below is my same working code in nodejs,but it i not working in ReactJs. can somebody guide me how to read file in React js. Do we have any simple method for this ? i just want to read file from same project directory.</p>
  
  <p>Working code in node js</p>
  
  <pre><code>const CSVToJSON = require("csvtojson");
  const CSVToCSV = require("jsontocsv");
  const FileSystem = require("fs");
  
  CSVToJSON().fromFile("./ca-500.csv").then(source =&gt; {
      console.log(source);
  })
  </code></pre>
  
  <p>But when tried in React js it is giving below mentioned error</p>
  
  <p>Error: Cannot find module 'fs'</p>