u/LGelashwili

▲ 7 r/nextjs

Hi everyone,

I’m testing out the new Next.js 16 features and I’ve run into a weird issue with cacheComponents: true.

The Setup:

  • Next.js 16 (App Router)
  • next-intl for i18n
  • next-themes (shadcn) for dark mode toggle

The Problem: If I refresh the page and change the language, everything works fine. However, if I toggle the theme first and then change the language, the theme state seems to "link" to the language change. Changing the language suddenly toggles the theme back or triggers an unexpected theme shift.

If I set cacheComponents: false, the behavior disappears and everything works perfectly.

I’m really trying to stick with the Next ecosystem for this project and utilize the new caching layer, but this is making me consider jumping to TanStack Start. Has anyone encountered this "state ghosting" with the new cache?

FIXED: I created another layout outside the [locale] directory and moved the ThemeProvider there. It’s now working even with cacheComponents enabled.

reddit.com
u/LGelashwili — 13 days ago

Hey everyone.

I have a question regarding the TanStack ecosystem. Currently, when I scaffold a new React project with TanStack Router via Vite, it seems to default to TanStack Start.

I’m about to begin a new financial web app (similar to QuickBooks) and I’m torn between using just the Router or going with Start. My main concern is that I’ll be building a separate backend (using Hono) because I need to support a mobile app in the future.

Since I’m planning to switch from Next.js to the TanStack ecosystem, I’m looking for some advice:

  • Would it be good practice to use Start alongside a separate Hono server, or is it better to stick to just the Router?
  • I’m planning to use a separate backend, given the need for a decoupled architecture for a future mobile app.

Any insights or experiences you could share would be greatly appreciated. Thanks in advance!

reddit.com
u/LGelashwili — 17 days ago