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.
Property image display - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Property image display
All right, guys. So we're going to make it so we can actually see the Cloudinary images in our listings. But before we do that, there's one thing I want to mention that you probably have wondered about if you've tried to go to the properties page after adding a listing. And that is that it doesn't show up right away unless you do a hard refresh with Command-Shift-R, or what is it on Windows? F5, or whatever. So to keep that from happening, what you can do is, and this is only when we're making requests from the server, which we are in this case in our request.js file and this fetch properties. So to fix that, all you have to do if you want it to show up right away is in the fetch request right here, where we're fetching from our domain slash properties, we just need to add in an option as a second argument with cache set to no store. If you do that, and then you can see that Brad's property just popped up right away. So if you do that and you submit a property, it redirects you to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.