Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v10 I18nextProvider typings missing #718

Closed
panjiesw opened this issue Feb 7, 2019 · 8 comments · Fixed by #721
Closed

v10 I18nextProvider typings missing #718

panjiesw opened this issue Feb 7, 2019 · 8 comments · Fixed by #721

Comments

@panjiesw
Copy link
Contributor

panjiesw commented Feb 7, 2019

Describe the bug
TypeScript typings doesn't include I18nextProvider.

Occurs in react-i18next version
v10.0.0

To Reproduce
Steps to reproduce the behavior:

  1. import {I18nextProvider} from 'react-i18next in TypeScript
  2. See error
Module '"node_modules/react-i18next/src"' has no exported member 'I18nextProvider'.ts(2305)

Expected behaviour
Typings should include I18nextProvider

@adrai
Copy link
Member

adrai commented Feb 7, 2019

Can you suggest a PR? And perhaps @rosskevin or @schettino could review...

@panjiesw
Copy link
Contributor Author

panjiesw commented Feb 7, 2019

Not now unfortunately, maybe later this night (UTC+7)

@jkeruzec
Copy link

jkeruzec commented Feb 7, 2019

Could you provide an upgrade guide from V9 to V10 please ?

I saw that reactI18nextModule became initReactI18next.

I lost my withNamespaces and I don't what is replacing this ?

@Brisstor
Copy link

Brisstor commented Feb 7, 2019

@jkeruzec seems like withTranslation is replacement for withNamespaces.
About upgrading - it was enough for me to replace reactI18nextModule with initReactI18next and withNamespaces with withTranslation.

However, I didn't see any warnings about v10 containing some breaking changes...
I thing it would be nice to have some notification about that :)
Anyway, thanks for fast update!

@jamuhl
Copy link
Member

jamuhl commented Feb 7, 2019

I didn't see any warnings about v10 containing some breaking changes

@Brisstor semver?!? 9.x.x -> 10.0.0 = Breaking API else it would be just 9.1.0 (additional hooks no breaking)

@Brisstor
Copy link

Brisstor commented Feb 7, 2019

I didn't see any warnings about v10 containing some breaking changes

@Brisstor semver?!? 9.x.x -> 10.0.0 = Breaking API else it would be just 9.1.0 (additional hooks no breaking)
You're right, that makes sense, thanks

@jamuhl
Copy link
Member

jamuhl commented Feb 7, 2019

@jkeruzec @Brisstor https://react.i18next.com/latest/migrating-v9-to-v10 hopefully helps a little - contribution with your migration experiences would be very welcome.

@danielsogl
Copy link
Contributor

I created an PR to fix that issue. I had the same problem after migrating to V10.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants