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

fix: issue 1728 when useSuspense is false and default ns #1731

Conversation

timheilman
Copy link
Contributor

is custom, in strict mode only, memoization is performed of an unready translation function and is not refreshed after readiness.

The use of the isInitial ref is fundamentally incompatible with strict mode. Substituting ready instead seems to fix #1728 and keep both #1691 and #1718 fixed

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided
  • commit message and code follows the Developer's Certification of Origin

is custom, in strict mode only, memoization is performed of an unready translation function and is not refreshed after readiness.

The use of the isInitial ref is fundamentally incompatible with strict mode. Substituting ready instead seems to fix 1728 and keep both 1691 and 1718 fixed
@coveralls
Copy link

Coverage Status

coverage: 97.017% (-0.003%) from 97.02%
when pulling 5b98721 on timheilman:fix/1728-custom-default-ns-useSuspense-false-in-strict-mode-fails-initialization
into d95d697 on i18next:master.

@timheilman
Copy link
Contributor Author

timheilman commented Mar 6, 2024

A review from @medihack would be much appreciated, especially for the shallow routing issue he was familiar with. It's a shame it's so difficult to unit-test StrictMode.

@adrai adrai merged commit a0c3d3e into i18next:master Mar 6, 2024
8 of 9 checks passed
@adrai
Copy link
Member

adrai commented Mar 6, 2024

thx, it's included in v14.0.8

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

Successfully merging this pull request may close these issues.

14.0.5 with custom defaultNS and useSuspense: false does not work with i18next-resources-to-backend
3 participants