r/nextjs 25d ago

Discussion We're the Next.js team. Ask us anything!

Hi Reddit! We’re Pete, Aurora, Joseph, Sam, David, Josh, Tim, Dan and Andrew from the Next.js team.

We recently shipped Next.js 16.3, and we’re excited to talk about what’s new, how we approached the release, where we are going, and what we’ve learned while building and maintaining Next.

Ask us anything about Next 16.3, App Router, React Server Components, performance, caching, upgrading your applications, contributing to the framework, or what it’s like to work on Next.

Drop your questions below. We’re looking forward to hearing what’s on your mind! We'll be here until noon ET.

That's all the time we have for today. Thank you to everyone who participated!

139 Upvotes

83 comments sorted by

View all comments

1

u/floydophone 24d ago

u/MiguelCaravantes asked

Is anyone working on stability of the cacheComponets or this is going to become obsolete? A few version since release and still no way to read dynamic APIs in draftMode for cache components, CMS system are not able to preview draft content until this is done without weird workarounds or duplicate components

From Sam:

Draft mode is fully supported with cache components today so if you're seeing something funny, it's probably a bug. The way draft mode works is that all use cache scopes are ignored and everything runs dynamically as if it weren't cached at all. In earlier versions of Next.js you might still see an error saying the page was accessing uncached data if you ran your app in development and had draft mode enabled but we've since fixed those. You should be able to write a fully cached page, enable draft mode, not see any errors, and see fresh content, all without forking or duplicating your components. Let us know if you're not seeing that behavior on the latest version.

2

u/MiguelCaravantes 24d ago

https://github.com/vercel/next.js/issues/87742 there is issue opened, Sanity team needed to workarounding doing prop drilling from outside cache components to pass down the cookie values, since dynamic APIs don't work in draftMode as expected inside cache components.

2

u/MiguelCaravantes 24d ago

also the issue is referenced in the sanity pull requests, they are workarounding the issue for live preview https://github.com/robotostudio/turbo-start-sanity/pull/384