router.push from "next/navigation" is waiting next.js api response inside a useffect from a use client component. #78786
Labels
Dynamic Routes
Related to dynamic routes.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Link to the code that reproduces this issue
none
To Reproduce
label={tab.label}
value={tabs.findIndex((t) => t.path === tab.path)}
onClick={() => {router.push(tab.path) }}
/>
and use it in layout.tsx
Current vs. Expected behavior
router.push wait until request is finished. Should redirect immediately.
If there are 2 components instead 4 router.push works fine
Provide environment information
Which area(s) are affected? (Select all that apply)
Dynamic Routes
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: