From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Spinner component

Spinner component

All right, so this should be a pretty quick video. I just want to add a spinner for when we're fetching the property here. Because if I go to the home page, reload, click on Details, well, I guess it does show. Let me see. Details. I mean, you don't really have to add it, but let's just do it anyways. Because there's probably going to be other places where we want to use, just stick a spinner component in. So in components, let's create spinner.jsx. And it's basically going to be the same thing that we created on the loading page. So we can probably just copy what we have here. So I'll grab that, paste that in. That was from loading.jsx. And let's see, we're bringing in the Clip Loader, Override. We're just going to call this Spinner. Make sure you export it as Spinner as well. All this stuff will stay the same. So basically, it's just a component that we can put anywhere in addition to the loading page when it loads a full page. Because you might want, you know, if you fetch…

Contents