Closed landvibe closed 1 year ago
Unfortunately, that's a Next.js issue. You can't share in-memory stuff from layouts to pages using cache()
, that's we manually have to call setStaticParamsLocale
on every page.
As soon as there is a way to share data from layouts down to pages, we'll update next-international to use it.
Calling
setStaticParamsLocale
in every page.tsx is a cumbersome task. It seems that callingsetStaticParamsLocale
in a dynamic page is also fine. So, it's most convenient to callsetStaticParamsLocale
in the root's layout.tsx. Is that okay to do?