Next.js Discord

Discord Forum

draftMode and caching

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
How is draftMode intended to be implemented?

I'm using Next 14 and have implemented draftMode as a state over existing routes in my application (not different routes to see drafts).
This means if I have a published page at /foo/bar with drafted revisions for that same page stored in my CMS, when draftMode is enabled, /foo/bar will show the drafted revisions instead of the published page.

But this means that every request to /foo/bar is sensitive to cookies and as such, SSG/ISR of this page is non-existent, even when draftMode is disabled.

Am I don't something wrong or is this the downside of opting into draftMode?

0 Replies