mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This provides a way to refresh the client cache from within a server action. This is useful when you need to refresh the client UI / read your writes without needing to rely on `updateTag`. --------- Co-authored-by: JJ Kasper <[email protected]>
10 lines
192 B
TypeScript
10 lines
192 B
TypeScript
import { connection } from 'next/server'
|
|
import { refresh } from 'next/cache'
|
|
|
|
export default async function Page() {
|
|
await connection()
|
|
refresh()
|
|
|
|
return <div>This should error</div>
|
|
}
|