diff --git a/packages/next/src/client/index.tsx b/packages/next/src/client/index.tsx index 87a45c7ab4ed1..d1b1140616976 100644 --- a/packages/next/src/client/index.tsx +++ b/packages/next/src/client/index.tsx @@ -326,6 +326,10 @@ function renderApp(App: AppComponent, appProps: AppProps) { function AppContainer({ children, }: React.PropsWithChildren<{}>): React.ReactElement { + // Create a memoized value for next/navigation router context. + const adaptedForAppRouter = React.useMemo(() => { + return adaptForAppRouterInstance(router) + }, []) return ( @@ -336,7 +340,7 @@ function AppContainer({ ) } > - +