useRouter from next/navigation does not load the route immediately and i have to wait a littel an it seems the click is not registered, it waits for the page to render on server side then redirect neither the url changes in the browser till the page is rendered on server side.what i want is the url should change and the data for page should load on the redirected page
2
Answers
You can add a loader to avoid this problem.
Just add a loading.tsx in your folder which has your layout.tsx file.
This loader will prevent your said delay.
You can check how to add loading here
Try Adding a loading indicator during the route change to get a visual feedback that the page is loading.