adrianhajdin / project_graphql_blog

With featured and recent posts, categories. full markdown articles, author information, comments, and much more, this fully responsive CMS Blog App is the best Blog Application that you can currently find on YouTube. And what's best of all is that you and your clients can manage the blog from a dedicated Content Management System.
https://jsmastery.pro
1.47k stars 348 forks source link

TypeError: Cannot read properties of undefined (reading 'map') #15

Open GitCulture opened 2 years ago

GitCulture commented 2 years ago

Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'map')

Source sections\FeaturedPosts.jsx (57:37) @ FeaturedPosts

<div className="mb-8">
<Carousel infinite customLeftArrow={customLeftArrow} customRightArrow={customRightArrow} responsive={responsive} itemClass="px-4">
 {dataLoaded && featuredPosts.map((post, index) => (
                    ^
<FeaturedPostCard key={index} post={post} />
)}
 </Carousel>
tuankietcoderr commented 2 years ago

did you declare or initialize it ?