-
-
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
add context prop to <Trans> Component #1464
Comments
Would you like to send a Pull Request to address this? Remember to add unit tests. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Too bad you didn't get in touch... I quickly did it myself. I hope this is ok. |
Wow, thanks a lot and sorry for not getting back to you. When thinking on the implementation, I've noticed that there could be a few problems with Typescript validation as the context would need to be tied to the custom type, but I believe in that case, it would need to be set to Thanks again for implementing this so quickly. |
Sorry, missed to update the types: v11.16.1 should be better |
🚀 Feature Proposal
Add
context
prop to theTrans
component. Previously mentioned over #837Motivation
Just like we have
<Trans count={n}>
, we could also have thecontext
prop to pass the option rather than having to define it undertOptions
, which is less readable.Example
The text was updated successfully, but these errors were encountered: