🚀 What’s Going On?

Next.js isn't just React. It's a full-stack framework that runs code both on the server and client.

In Next.js, components are by default Server Components — they don’t run in the browser unless you tell them to.


🧩 Two Kinds of Components

1. Server Components (Default)

Example: Layouts, headers, static text components


2. Client Components

To use a Client Component, add this at the very top of the file:

"use client";

Example Use Case:

An image slideshow that changes images every 5 seconds using useEffect.