Prevent page re-render on initial revalidatePath call
Unanswered
English Angora posted this in #help-forum
English AngoraOP
As described in this official nextjs discussion (https://github.com/vercel/next.js/discussions/54075), when revalidatePath is called it will cause the current page to re-render. This seems to only happen on the initial call, as subsequent calls to revalidatePath don't cause re-renders.
Is there a way to prevent this re-render? An example where this behaviour is undesirable is lets say I have a modal and can press a button that calls a server action to mutate some data. The first time I do this, the page re-renders, and the modal closes instead of staying open.
Is there a way to prevent this re-render? An example where this behaviour is undesirable is lets say I have a modal and can press a button that calls a server action to mutate some data. The first time I do this, the page re-renders, and the modal closes instead of staying open.