title: Write to file in project directory - React Native
body: <p>I want to write/update an existing file called <code>fileName.json</code> present in <code>projectRoot\src\data\database\</code> directory, from a react-native code present in <code>projectRoot\src\data\network\dbHelper.js</code> file.</p>
  
  <p>To read the file, I am using the below code -</p>
  
  <pre><code>var data = require('../database/lawyer_data.json');
  </code></pre>
  
  <p>However, to write the file, I tried using <code>fs</code> module like this -</p>
  
  <pre><code>const fs = require('fs');
  </code></pre>
  
  <p>But it gave the error - <code>Unable to resolve module fs</code></p>
  
  <p>Then I did <code>npm install fs --save</code> which gave another error which suggests that <code>fs</code> is not meant to be used in React native.</p>
  
  <p>I can't use <code>react-native-fs</code> module because it is used to access client-side files. But I want to update files in project development directory.</p>
  
  <p>What should I do?</p>