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.

Image component JSX

Image component JSX

2nd of October. So we are on our very last component that we have to build on the front end. We already get the data from Strapi and that is here this landscape component. It's actually pretty easy, it's just the image with the caption below. So when we get into it we're not going to write that much code for this one. So we're going to go into Visual Studio Code and just create within our block folder another new component called landscape image dot jsx and per usual i'm just gonna very quickly type that up here we're going to receive some image data and what we're going to return for now is null export the component and then bring it into our article component just make sure to export default there we go okay Now, on our article component, very similar to everything that we've done before. So landscape image is the one we're bringing in. And here, I said we have some image data which will come in from this component right here. And now, there we are, landscape image. What do we…

Contents