-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
refactor: Set config.react.useSuspense to false #1530
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/isaachinman/next-i18next/FrtVeK9W77XP8FLA9LbhATotHzpU |
This is ok, just the default options anyway.... |
Yeah, good point. We could add it to this section. Although, is that statement exactly correct? The namespaces will need to be listed either way. If you await the ready flag without passing namespaces, the instance will be "ready" but without any content, right? |
Yes, that section should be ok. the i18next instance is always ready after initialization, but if the namespaces where not listed in the ns option, they are not loaded on init, but on request (i.e. useTranslation) and this means they are loaded asynchronous, that's why the ready flag has to be checked... |
But, the ready flag cannot be checked arbitrarily during React render (when the |
What do you exactly mean by this? Here an example: https://github.com/i18next/react-i18next/blob/2bd69a2cc638acfafb37dc0c56db6add4e9dac85/test/typescript/examples.test.tsx#L59 |
Ah, I see what you mean. Thanks for explaining. Would you have a moment to write this up for the |
I'm not that good in english, but I will try in the next hours... |
Fixes #1255
cc @adrai – following up on your comment: #1255 (comment)
We are already awaiting the initialisation promise inside
serverSideTranslations
here.The reason you have to manually list your namespaces in your demo project here is because they are not present in your filesystem, which we normally query for automatically.
Let me know if you think this looks like a safe change 👍