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 paragraph JSX

Article paragraph JSX

Okay, so having done the most difficult component, we're now going to move to a very easy one again, which is going to be the paragraph component right here. So in our article component, the generic one, we already have this prepared. And by the way, if you want to, you don't have to make this an extra component. You could also return it right here. I just like to have it all structured in the same way. So I'm going to create its own component for that. So I'm going to call this article paragraph.jsx. And I'm just going to say article paragraph. I'll export it. It takes in a paragraph like that. Now I exported article paragraph like that. And we're going to return null here for now. So before, we're just going to set this up here. And then we'll take care of how we're actually going to do that component. So article paragraph is the one that is being returned here. As a prop, we hand in the component right here. We name it paragraph. And that is it on the article component. Now, what…

Contents