Lesson 10
The Architecture (Client vs Server)
Directives ("use client", "use server")
The Shift: While popularized by Next.js, these are now core React specifications. They define the "boundary" between code that runs on the server (rendering HTML/database access) and code that runs in the browser (interactivity/state).
👀 Preview
Directives clearly separate server and client code, enabling better security and performance.
📚 Explanation
React 19's `"use client"` and `"use server"` directives clearly separate client and server code. Server actions can safely access databases and APIs, while client components handle interactivity. This architecture improves security and performance.
App.tsx
How well did you remember this?