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

Allow iterable ReactI18NextChildren as children #1669

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

nicegamer7
Copy link
Contributor

Fixes issues where interpolations alongside other HTML element children would trigger TypeScript errors. Added tests to make sure this stays working.

Note: I went with React 18 typings becuase React 16 typings allowed for objects to be passed as children, which made it hard to test that our allowObjectInHTMLChildren option was working correctly. This shouldn't affect end-users since it's a development dependency.

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

@coveralls
Copy link

Coverage Status

coverage: 96.173%. remained the same when pulling 381b227 on nicegamer7:hotfix/react-children into 056a85e on i18next:master.

@adrai adrai requested a review from pedrodurek August 29, 2023 13:14
@adrai
Copy link
Member

adrai commented Aug 29, 2023

fyi: @YutaMoriJP

@adrai adrai merged commit 16312ff into i18next:master Aug 29, 2023
@adrai
Copy link
Member

adrai commented Aug 29, 2023

thank you @nicegamer7
v13.2.1

@nicegamer7
Copy link
Contributor Author

No worries :)

@YutaMoriJP
Copy link

@adrai @nicegamer7 Thanks you two 🙏

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

Successfully merging this pull request may close these issues.

4 participants