Quantcast
Channel: Not getting any data from getStaticProps - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Aditya for Not getting any data from getStaticProps

$
0
0

The error you are getting is from the 'gyms' prop. Please make sure if you are using useEffect in the component where you are using Map, the array variable should be in the array. Since you are getting the array as undefined then this is the most possible problem. Just put it in the array like this:

useEffect(() => {       //Code goes here...}, [gyms])

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>