-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
The PAGE CRASHES when you add I18nProviderClient and write in input control #290
Comments
🤯 I have no idea where this is coming from. Might not even be related to next-international, but Next.js / React itself? |
I think that if it has to do with next-international, if you do not wrap the components with the I18nProviderClient the page will not crash 😢 |
Even it's not great, you can use : {
en: async () => {
await new Promise(resolve => setTimeout(resolve, 100));
return import('./en');
},
fr: async () => {
await new Promise(resolve => setTimeout(resolve, 100));
return import('./fr');
},
}, in |
This change works to not block the page, but the javascript that loads later is blocked |
The I tried to remove it and use it in a
|
Thanks for the investigation @Yovach, I'll take a look this weekend. But this is honestly a very strange behavior... |
If you want to reproduce it easily:
Then, your CPU should get 100% of usage (wtf?) Can we preload locales in the |
Sorry for the delay - https://github.com/QuiiBz/next-international/releases/tag/1.2.0 has been published! |
Describe the bug
When you interact with an input in a client component wrapped by an I18nProviderClient before the dictionary has finished loading, the page crashes
To Reproduce
Steps to reproduce the behavior:
Use the project in codesandbox that provides the documentation, add an input control in the client component
https://codesandbox.io/p/sandbox/jovial-paper-skkprk?file=%2Fapp%2F%5Blocale%5D%2Fpage.tsx%3A1%2C1
1.- add
<input autoFocus />
to the client component2.- Reload the page and write immediately
Expected behavior
the page should not crash.
Screenshots
About (please complete the following information):
Additional context
If you wait for the dictionary to finish loading completely, everything works perfectly.
The text was updated successfully, but these errors were encountered: