Skip to main content
InterviewHubPRO
Section Overview
Q44

Question 44 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

88%
Next.js & App Router (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

Draft Mode (`draftMode().enable()`) for Headless CMS Previews.

senior LevelSystem Design

In Simple Words: Enables editors in Contentful/Sanity to preview unpublished draft content:

  1. CMS triggers Route Handler /api/draft?secret=TOKEN.
  2. Route Handler calls draftMode().enable(), setting a secure cookie.
  3. Subsequent page loads bypass the static Full Route Cache and fetch live draft data from the CMS API.