Next.js·Practice drills 6

Drill 26: Predict the output — Server data

Describe the output you expect and how you would check it.

Intermediate 5 min read Lesson 133 of 150 Challenge included
What you will be able to do
  • Describe the output you expect and how you would check it.

Practice task

Describe the output you expect and how you would check it.

app/courses/page.tsxJavaScript
export default async function Courses() {
  const res = await fetch('https://example.com/api/courses', { cache: 'no-store' })
  const courses = await res.json()
  return <ul>{courses.map((c) => <li key={c.slug}>{c.title}</li>)}</ul>
}
Your turn

Write your answer

Easy

Describe the output you expect and how you would check it.

TEXT · starter
Your answer…
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 133 of 150 · 0% of course