Revalidating a route causes screen flash
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
Has anyone an idea why this would happen? I send a req to revalidate a route, because it would appear there's no way to prevent Next.js from caching Server components, and you have to revalidate manually...
8 Replies
You can add this to the path you want to validate to opt out to caching
const dynamic = 'force-dynamic'
const dynamic = 'force-dynamic'
@Berlim You can add this to the path you want to validate to opt out to caching
const dynamic = 'force-dynamic'
Giant pandaOP
actually thats totally wrong
navigation between the pages wont force the server component to rerender with new data unless you revalidate
and i've tried
Antillean Nighthawk
It was happened to me yesterday,check your middleware and check your files as well where your redirecting to the particular pages.
its redirect issue
Giant pandaOP
i have no redirect
@Giant panda actually thats totally wrong
Show us some code