[question] load translation client side for dynamic routes #817
Unanswered
EyadAlghamdi
asked this question in
Q&A
Replies: 1 comment
-
Yes you can use DynamicNamespaces |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi, i have a dynamic route
/items/[id].ts
which i understand will break the static site caching and will usegetServerSideProps
by default, which i am trying to avoid using, since i want my pages to load fast,so the other option is to use a
getStaticPaths
like sobut the problem with this approach is that nextjs will create a huge number of cache files per each new item, which isn't ideal for me since we got thousands of items. (and each new item will use SSR anyway)
so the final solution I can come up with is to load the translations client-side instead of serverside (only for dynamic routes at least). is there a way for me to load these namespaces in the browser clientside?
Beta Was this translation helpful? Give feedback.
All reactions