Files
Andrew ClarkandGitHub 8c5af211d5 Fix: Server refresh() should not purge client cache (#86878)
The server form of refresh() is used to re-render all the dynamic data
on the current page. Unlike updateTag/revalidateTag, it does not affect
any cached data, so the client cache should not evict any of its
entries.
2025-12-11 13:26:28 -05:00

18 lines
288 B
TypeScript

'use client'
import { useRouter } from 'next/navigation'
export function ClientRefreshButton() {
const router = useRouter()
return (
<button
id="client-refresh-button"
onClick={() => {
router.refresh()
}}
>
Client refresh
</button>
)
}