mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
To bypass existing caches when editing server components, we store an HMR hash in a session cookie. The cookie is sent to the server when refetching the RSC, and included in the cache key of all `'use cache'` functions (see #75474). Before this fix, we weren't setting the cookie path properly, which led to multiple cookies for different paths being written and sent to the server. This caused stale values to be used for nested pages, which resulted in stale components being displayed after edits. Now, we set the cookie path to `/`, ensuring that the same cookie is used for all nested pages. closes NAR-204 resolves #81538
6 lines
89 B
TypeScript
6 lines
89 B
TypeScript
export default async function Page() {
|
|
'use cache'
|
|
|
|
return <p id="greeting">Hi</p>
|
|
}
|