From the course: The Freelance Stack: Real Project with Next.js and Strapi
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Render InfoBlocks on page - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Render InfoBlocks on page
So, the moment has come. We're now going to use the data from Strapi to actually display something on the website. So, we're going to get rid of the infoblock data in here because we don't need that anymore anyway. We have our infoblock data that is an array and in this case here for the main page it gives us two elements and both of these elements should turn into the actual info blocks. So let's do that first. We don't actually need, we're not going to have this kind of structure anymore because the idea is also that the client can potentially put in more and more info blocks, right? If the main page should have like four or five sections they should be able to do that through Strapi. So what we're going to going to be doing instead is we're going to say info block data dot map so for each one for each element we're now going to return a new info block and if the last video was already really difficult for you again that is totally okay you're going to see the pattern again and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Creating InfoBlock content type on Strapi14m 57s
-
(Locked)
Use single content type in Strapi to create InfoBlocks per page17m 33s
-
(Locked)
Fetch InfoBlock data on Strapi8m 27s
-
(Locked)
Fetch data from Strapi and process it16m 57s
-
(Locked)
Render InfoBlocks on page9m 20s
-
(Locked)
Create button from InfoBlock Strapi data on page7m 13s
-
(Locked)
Render InfoBlocks on experience page4m 45s
-
(Locked)
-
-
-
-
-