Foundations
Route handlers & data
Lesson 3 of 3
Add a server endpoint with a route handler, and decide what to cache vs. keep fresh.
What you'll learn
- Write a route handler that returns JSON
- Know when you need a handler vs. just fetching in a Server Component
- Classify data as static, cached, or dynamic
Members only
A free account unlocks this lesson and every other one.
Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.
Not sure yet? Try the free lesson first: Folders are routes