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

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…

Contents