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.

Server vs. client components and router hooks

Server vs. client components and router hooks

All right, guys. So I want to do a couple of things in this video. So one is to show you the difference between server components and client components and when to use which. And then I also want to show you some of the hooks that we get from the Next.js navigation or from the Next router. So we can do things like redirect from our functions. We can get the ID from the URL. We can get query params, things that you're going to do throughout this project. All right, so the stuff we're going to do right now isn't going to stay. It's just to kind of teach you some of the features. But we will be using it later on. Now, one thing I want to show you before that is if you're getting weird warnings and errors in your console, it's most likely from a browser extension. So I had a couple, actually. One from ColorZilla. I had one from LastPass. Grammarly is also a culprit with this. But if I enable ColorZilla and I reload, I get this extra attributes from server warning. So if you're seeing…

Contents