useTransition
and revalidatePath
does not work as expected when inside is executed server action and that code is used in Parallel and Intercepted Route
#55911
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://github.com/grzegorzpokorski/next-usetransition-server-actions-revalidation-issue
To Reproduce
Strange
useTransition
behavior and navigation crashing:/
go to cart
link which leads to/cart
page - after that should apear intercepded & parallel 'modal' page.useTranstion
hook to indicate if is pending.fetching
label even after data are successfully fetched.close modal
button - in browser address bar url should change from/cart
to/
, but modal does not disappearing, other links also stops working.ReavalidatePath
does not work in server actions executed on parallel and intercepted route:/cart
/cart
does not revalidating after executing server action.Current vs. Expected behavior
Current behavior was described in "To Reproduce" section above.
When you remove
./src/app/@modal
directory from project - just simply remove parallel and intercepted route for /cart everything work fine. It means:useTransition
hook,/cart
page are revalidating after execution server action withrevalidatePath
.Above behavior is expected also to situation when parallel and intercepted route is in use.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 18.11.0 npm: 8.19.2 Yarn: 1.22.19 pnpm: 8.6.0 Relevant Packages: next: 13.5.3-canary.3 eslint-config-next: 13.5.3-canary.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
No response
The text was updated successfully, but these errors were encountered: