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

Restore support passing the defaultNS as I18nextProvider prop #860

merged 1 commit into from May 30, 2019


Copy link

alexbakum commented May 29, 2019

During react-i18next evolved the support (introduced at #478) of defaultNS prop has been dropped from I18nextProvider. So attempting to restore it.
We're still looking forward to share same instance of i18next between different provider instances and hooks.

const i18n = /* some i18next instantiating */
const Translated = () => {
  const {t} = useTranslation();

  return (<div>{t('the_key')}</div>);
const FirstWrapper = () => (
  <I18nextProvider i18n={i18n} defaultNS="firstOne">
    <Translated />
const SecondWrapper = () => (
  <I18nextProvider i18n={i18n} defaultNS="secondOne">
    <Translated />

This comment has been minimized.

Copy link

coveralls commented May 29, 2019

Coverage Status

Coverage remained the same at 91.915% when pulling c8534e7 on alexbakum:restore-default-ns into 7d3056e on i18next:master.

@jamuhl jamuhl merged commit a52dcc7 into i18next:master May 30, 2019
4 checks passed
4 checks passed
ci/circleci: build Your tests passed on CircleCI!
codeclimate All good!
coverage/coveralls Coverage remained the same at 91.915%
workflow Workflow: workflow

This comment has been minimized.

Copy link

jamuhl commented May 30, 2019

thank you...was published in react-i18next@10.11.0

If you like this module don’t forget to star this repo. Make a tweet, share the word or have a look at our to support the devs of this project -> there are many ways to help this project 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.