title: Reset imported js file when back button is pressed
body: <p>I have question about how to reset the imported js file when user click on the back button and click forward button.</p>
  <p>So for example</p>
  <p>a.js file (where it will display the data) will import getData function data.js file.
  data.js file will send the data to the a.js file.</p>
  <p>Example data for data.js file below</p>
  <pre><code>const data = [
    {
      id: &quot;bee&quot;
      bool: true
    },
    {
      id: &quot;spider&quot;
      bool: false
    }
  ]
  
  const getData = () =&gt; {
     const tempData = data;
     // do the logic here and return
     return tempData;
  }
  
  
  export default {
    getData 
  };
  </code></pre>
  <p>so lets say I change the data from the a.js file using the getData function after importing the data.js file. The data still holds the previous data. So if I change the id spider bool to true, it will still holds the value of true when user clicks on the back button and comeback to the page again with forward button.</p>
  <p>I tried to do the useeffect to reset the data but that did not work...
  Is there a way to reset the data.js file?</p>