-
-
Notifications
You must be signed in to change notification settings - Fork 767
ready
always returns true
on the server (even when ns is not in serverSideTranslations)
#2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
on server side it always tries to load all namespaces... and the ready flag is always true on server side, since there is no suspense... |
@adrai It looks like even the
|
That's why I suggest the alternative way and not use the ready flag. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug Report
In my app we use some dynamically loaded translation files where the namespace is not in
serverSideTranslations
and instead we use theready
flag (fromuseTranslation
) to determine when the translations are available on the client.Recently we've noticed that the ready flag ALWAYS returns
true
on the server, but thenfalse
on the initial client render when the ns is not SSRed. This causes a hydration error.To Reproduce
A minimal reproducible example. (slightly modified from the example auto-static-optimize)
link to component: https://github.com/arishoham/broken-i18n-ready-flag/blob/main/components/TestComponent.tsx
Expected behavior
I expect on the server
ready
to befalse
because thesecond-page
namespace is not inserverSideTranslations
(here).Your Environment (for my actual app)
The text was updated successfully, but these errors were encountered: