#Client side navigation not working after upgrade

1 messages · Page 1 of 1 (latest)

spice compassBOT
#

Hi @alpine quest. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, it seems that there have been some issues reported with client-side navigation after upgrading to Next.js 14+. However, it's not explicitly stated that the 'use client' directive is required for client-side pages in Next.js 14+.

In one of the issues, a user reported that adding 'use client' at the top of the page file resolved their problem (source (https://github.com/vercel/next.js/issues/66277)). However, another user pointed out that adding 'use client' makes the page client-side, which may not be the desired behavior if you want the page to remain server-side (source (https://github.com/vercel/next.js/issues/66277)).

In another issue, a user reported that their layout file seemed to become a client component instead of a server component after updating to Next.js 14, even though they had 'use client' in their page file (source (https://github.com/vercel/next.js/issues/55473)).

It's also worth noting that in Next.js, you can use the dynamic function from 'next/dynamic' to import components dynamically, which can be useful for optimizing client-side performance (source (https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading#importing-client-components)).

Given these sources, it seems that the behavior of 'use client' and client-side navigation may vary depending on the specific setup of your Next.js application. If you're experiencing issues with client-side navigation after upgrading to Next.js 14+, it may be helpful to check if similar issues have been reported on the Next.js GitHub page, or to seek help from the Next.js community.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@alpine quest kapa.ai is still learning and improving, please let us know how it did by reacting below