Next.js Discord

Discord Forum

modal navigation is having some delay like ( 2sec ) for the first next modal

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I have implemented modal using shadcn,
1. When I was using state ( using zustand ) to navigation between modal which mean to open different modal on the state the navigation was instant but
2. we needed browser navigation ( back and forward ) for modal so I used searchParams to open different modal, The issue I'm getting is when the first modal navigate to the next modal there is a 2sec delay but for other modal I don't see any delay.

what should I do? Is there a way to use state and add feature of browser navigation ?

0 Replies