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 allow to replace i18n in provider with useTranslation hook (#1272) #1273

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

medihack
Copy link
Contributor

@medihack medihack commented Mar 6, 2021

  • only relevant code is changed (make a diff before you submit the PR)
    -- Prettier seems to be run on committed files as part of the pre-commit husky hook and did some little code changes in useTranslation.js, not my fault ;-)
  • run tests npm run test
  • tests are included
  • documentation is changed or added
    -- No need for documentation update

@coveralls
Copy link

coveralls commented Mar 6, 2021

Coverage Status

Coverage increased (+0.04%) to 96.205% when pulling bd657b6 on medihack:replaceable-i18n-instance into 3780795 on i18next:master.

};
}, [namespaces.join()]); // re-run effect whenever list of namespaces changes

const isInitial = useRef(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you maybe add an inline comment to explain why this is needed?
For future generations ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neet -> need

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uups. Fixed.

@adrai
Copy link
Member

adrai commented Mar 6, 2021

lgtm

@jamuhl jamuhl merged commit 13c95ce into i18next:master Mar 8, 2021
@jamuhl
Copy link
Member

jamuhl commented Mar 8, 2021

thanks to all participating in this fix

was published in react-i18next@11.8.9

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.

4 participants