-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
support for optional tagName for components -> FormattedDate, Formatt… #131
Conversation
…edNumber, FormattedRelative, FormattedTime
@@ -24,12 +24,13 @@ var FormattedDate = React.createClass({ | |||
|
|||
render: function () { | |||
var props = this.props; | |||
var tagName = props.tagName || 'span'; |
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.
Specify 'span' as a default value.
support for optional tagName for components -> FormattedDate, Formatt…
Just leaving a note here that |
@ericf maybe a warning when using |
@ericf Please release it as a minor version? Or any release in roadmap soon? |
Trying to determine if Also, in the |
Chiming in months later with a request to change it to https://facebook.github.io/react/docs/animation.html#rendering-a-different-component For all I know |
@SimenB What's your use case? I won't be adding support for passing various props to the underlying component that's rendered; if you need to customize rendering in that way you can pass a function as the child. |
No use case (we already wrap the |
What do you use |
We don't use it (or, we did, until I watched "Dom as second-class citizen"). My comment was just on the fact that you named your prop something other than React did, which makes it a bit less intuitive (even though I know its use is discouraged). |
Of course, transition group is a container and requires children which intl does not, so it's not the exact same thing |
The driving force for me to support this is rendering in React Native and SVGs which don't have |
…ate skeleton (#131) * [intl-messageformat-parser] add parser for number skeleton and date skeleton * remove unused command
support for optional tagName for components instead of hardcoded span element.
It solves the issue