-
Notifications
You must be signed in to change notification settings - Fork 380
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 null override for default component #799
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/lingui-js/js-lingui/llimgu2ze |
Codecov Report
@@ Coverage Diff @@
## main #799 +/- ##
==========================================
- Coverage 84.33% 84.20% -0.14%
==========================================
Files 39 39
Lines 1264 1266 +2
Branches 332 333 +1
==========================================
Hits 1066 1066
- Misses 116 117 +1
- Partials 82 83 +1
Continue to review full report at Codecov.
|
Hey @dhaigh, thanks for the bug fix! You're right. Could you also please provide a test? Just add relevant test cases to js-lingui/packages/react/src/Trans.test.tsx Lines 139 to 204 in de7d07e
|
@tricoder42 i had a go, let me know what you think :) |
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.
Pretty good!
Released in 3.0.1. Thank you for your contribution! 👍 |
the docs state that
render={null}
orcomponent={null}
should override thedefaultComponent
prop. (https://github.com/lingui/js-lingui/blame/v3.0.0/docs/ref/react.rst#L88)suppose I had this
current behaviour:
<App /> === <span>Hello</span>
expected behaviour:
<App /> === 'Hello'