-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 Trans component to support react 18 types #1492
Conversation
7dddb80
to
f607081
Compare
included in v11.16.8 |
declare module 'react' { | ||
interface HTMLAttributes { | ||
children?: ReactNode | ObjectOrNever; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this override is breaking all components that use render props when upgrading to React 18. We can patch this away, but I would strongly encourage NOT overriding generic types for all components. Can't it be limited to just the Trans
component? A sledgehammer can't be the only solution when a scalpel will do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to provide a PR with a better solution that works.
// @marcalexiei do you know about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cellog extending is different from overriding. Share a minimal reproducible example so we can see how we can help you.
Closes #1490 and #1483
Checklist
npm run test
Checklist (for documentation change)