-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent revalidateTag/Path during render
also revert changes from #70446
- Loading branch information
1 parent
5ea9544
commit 72696e2
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
test/e2e/app-dir/revalidatetag-rsc/app/revalidate_via_page/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use server' | ||
|
||
import Link from 'next/link' | ||
import { revalidateTag } from 'next/cache' | ||
|
||
const RevalidateViaPage = async ({ | ||
searchParams, | ||
}: { | ||
searchParams: Promise<{ tag: string }> | ||
}) => { | ||
const { tag } = await searchParams | ||
revalidateTag(tag) | ||
|
||
return ( | ||
<div className="flex flex-col items-center justify-center h-screen"> | ||
<pre>Tag [{tag}] has been revalidated</pre> | ||
<Link href="/" id="home"> | ||
To Home | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default RevalidateViaPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters