title: Need help why am I getting undefined here how do I fix it?
body: <p>I'm getting undefined here. How can I load the data in <code>useEffect</code> and when everything is loaded how do I store it in <code>useState</code> variable and render things i need ?</p>
  <pre><code>const appDesign = require(`./data/${subcategory}`)
  
    useEffect(() =&gt; {if (router.asPath !== router.route) { }  }, [router])
  </code></pre>