title: How do I export an JSON file correctlly react?
body: <p>I have an API url where I will do a get request. But I dont want to use this directly from my component. I want to store the result into an json file and import it from my component.</p>
  <p>example of psedocode:</p>
  <pre><code>// example.json
  let data = fetch(url).then()
  
  export data
  </code></pre>
  <pre><code>// Buy.jsx
  import data from './data/example.json
  
  useEffect(
  //... store it to the state
  )
  </code></pre>
  <p>What is the correct way to implement this ?</p>