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.
Home property listings - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Home property listings
So now we're going to do the properties on the home page. I want three randomized properties. So one thing I forgot to do that I just fixed is in the property card component, I had a bunch of classes that I forgot to set to class name. So just make sure you go through. Just open up your console. And if you see any warnings saying class needs to be class name, just make sure you fix that. All right, so if we open up our home page, which is app, and then page.jsx. We could bring in our JSON file here, loop through them, display them, but I don't really want to put all that in the home page. I'd like to put that in a separate component. So let's create another component in the Components folder called HomeProperties.jsx. That way, we can keep our home page kind of clean. And then in here, we'll do RAFCE. And then I guess let's just save it and import it into our home page. So Home Properties. We'll put that right under Info Boxes. So we should see this, Home Properties. And then in here,…
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.
Contents
-
-
-
(Locked)
New project and folder structure6m 13s
-
(Locked)
Layout, homepage, and metadata10m 47s
-
(Locked)
File-based routing7m 16s
-
(Locked)
Server vs. client components and router hooks9m 44s
-
(Locked)
Start on the navbar10m 3s
-
(Locked)
Navbar links, drop-downs, and React icons12m 28s
-
(Locked)
Active links and conditional rendering11m 48s
-
(Locked)
Homepage components15m 45s
-
(Locked)
Properties page7m 26s
-
(Locked)
Property card dynamic data14m 41s
-
(Locked)
Home property listings7m 42s
-
(Locked)
Custom not found and loading pages5m 58s
-
(Locked)
-
-
-
-
-
-
-
-