Describe the bug
I want to be able to use server generated static pages using app router. But when I use getI18n() in components it switches to dynamic rendering because of this rule
headers() is a Dynamic Function whose returned values cannot be known ahead of time. Using it in a layout or page will opt a route into dynamic rendering at request time.
To Reproduce
Steps to reproduce the behavior:
Follow the instructions in here
Expected behavior
It should immediately return from cache. If I export my own getI18n() function and return translations for only one language it loads very fast which indicates that dynamic rendering is not turned on.
About (please complete the following information):
Describe the bug I want to be able to use server generated static pages using app router. But when I use
getI18n()
in components it switches to dynamic rendering because of this ruleTo Reproduce Steps to reproduce the behavior: Follow the instructions in here
Expected behavior It should immediately return from cache. If I export my own getI18n() function and return translations for only one language it loads very fast which indicates that dynamic rendering is not turned on.
About (please complete the following information):