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

React concurrent throws a side-effect warning for useTranslation #1170

Closed
AdrienLemaire opened this issue Sep 8, 2020 · 2 comments
Closed

Comments

@AdrienLemaire
Copy link

Related to #817

🐛 Bug Report

When using React concurrent mode (a 16.X release initially planned for Q2 2019 and not yet stable, but used in prod at facebook), the following error occurs when trying to call useTranslation within a lazy-loaded component with suspense.

To Reproduce

React concurrent mode with console warning: https://codesandbox.io/s/react-i18next-lazy-loading-example-forked-ozkgn

Expected behavior

No console warning and no side effect.
Expecting the same behavior as @jamuhl's example with React 16.12: https://codesandbox.io/s/react-i18next-lazy-loading-example-forked-kv2cr

@jamuhl
Copy link
Member

jamuhl commented Sep 8, 2020

update react-i18next to 11.7.2 should already solve this?

@AdrienLemaire
Copy link
Author

@jamuhl oh boy... Was running on 11.7.0 and incorrectly assumed that I was on the latest version (having renovate auto-create PRs for package upgrades). bumping to 11.7.2 indeed resolved the issue.
Sorry for all the messages, and thanks for the quick replies!

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