Skip to content
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

[gatsby-theme-i18n-react-i18next] hydrate and useTranslation #100

Open
kaelhem opened this issue Jan 24, 2021 · 1 comment
Open

[gatsby-theme-i18n-react-i18next] hydrate and useTranslation #100

kaelhem opened this issue Jan 24, 2021 · 1 comment

Comments

@kaelhem
Copy link

kaelhem commented Jan 24, 2021

Hi,
I'm trying to use the gatsby-theme-i18n-react-i18next theme but facing some hydratation issues.

To reproduce the behavior, you can simply clone this repo and launch the available react-i18next sample in dev:

cd themes-master/starters/example-react-i18next 
yarn && gatsby develop

When you click a link for the first time after page load, you can see this error displayed in console:
Warning: Cannot update a component (Layout) while rendering a different component (PageRenderer).

Looking at the stacktrace, it seems related to the 'useTranslation' hook of the react-i18next library.
I found this similar issue on the repo of the library : i18next/react-i18next#1124 but this is not very helping (I played with the useSuspense parameter, but it changes nothing apparently).

My question is: what are consequences of this warning ? Is it ok to "live with it" ? Is there some known workarounds?

Thanks !

@chrisk8er
Copy link

i Get the same issue when using useTranslation and gatsby-theme-i18n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants