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.
Article headline JSX - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Article headline JSX
So, we'll start with the easiest component in terms of styling and logic and all of that, but it will give us a good start because it shows us exactly the structure that we have to follow. So, what we're going to be doing is we're going to create the headline component now and for that we're just going to say article headline.jsx. So, we're creating a new component for that and what we'll be doing here is actually, let me export it. so article headline headline like this export default article headline nope there we go okay for now we can just do it like this the page we're going to split to the right and in here we're now going to actually not this page the article component in the article component what we're going to be doing is when we have the component type headline we're going to return the article headline component like that and we also have to give it a prop and here we now know that we're passing a headline because otherwise our switch case statement wouldn't get us here so…
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)
Create dynamic zone in Strapi for customizable blog content14m 6s
-
(Locked)
Creating data for highlight article8m 28s
-
(Locked)
Article hero section JSX5m 45s
-
(Locked)
Styling: Article hero section5m 26s
-
(Locked)
Article intro component JSX8m 40s
-
(Locked)
Styling: Article intro component5m 29s
-
(Locked)
Generic article component to render different component depending on Strapi data9m 14s
-
(Locked)
Article headline JSX3m 15s
-
(Locked)
Styling: Article headline1m
-
(Locked)
Text with image component JSX15m 9s
-
(Locked)
Styling: Text with image component5m 48s
-
(Locked)
Article paragraph JSX2m 23s
-
(Locked)
Styling: Article paragraph1m 6s
-
(Locked)
Image component JSX3m 49s
-
(Locked)
Styling: Image component2m 20s
-
(Locked)
Other articles section on individual blog page3m 17s
-
(Locked)
Blog section homepage JSX13m 11s
-
(Locked)
Styling: Blog section homepage8m 52s
-
(Locked)
Fix article item for featured items on homepage1m 18s
-
(Locked)
-
-