Closed oyfin closed 10 months ago
Hey @oyfin When using the App Router, the useRouter hook should be imported from next/navigation instead of next/router. Thank you for using our Nextplate. To learn more please visit: https://nextjs.org/docs/app/api-reference/functions/use-router
I'm using the Nextplate template for my Next.js project, which has a unique structure with pages located in src/app instead of the standard pages directory. I'm encountering an issue with useRouter, specifically receiving the error: "NextRouter was not mounted".
Could you provide guidance on how to correctly use useRouter or an alternative method for dynamic routing and data fetching in this non-standard setup? Any insights or documentation specific to handling routes and data fetching in the Nextplate template would be greatly appreciated.
Thank you!