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.

Subscribe to newsletter JSX structure

Subscribe to newsletter JSX structure

Awesome, we now have our highlight article readily styled and we're just going to move on to the next component in our blog page, which in this case here is the subscribe to our newsletter component right here. In order for us to create that, we're just going to head back into Visual Studio Code. We'll first, as per the usual, just create the JSX for it. So here I'm going to say subscribe to newsletter.jsx. That's going to be my component. I don't need any of this for now as we're just going to write the JSX. Now there's something special to this component because it's going to be the first component that has some client interactivity. In other words, the user here can create and send off or can put in the e-mail address and then send it off. So this is our first form component, which also means that this will need to be a client component. And remember, in Next.js 13, every component by default is a server-side component. So we have to specify explicitly when we're actually using or…

Contents