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
Number/Date/Mixin components exposed as IntlNumber/IntlDate/IntlMixin #60
Comments
Yeah, I've run into this too and agree it's not good. In terms of ES5 compatible syntax, Currently you can do this, but dot-notation in the JSX looks odd: var ReactIntl = require('react-intl');
<ReactIntl.Number>{1000}</ReactIntlNumber> As for ES6 module instance you can also do: import {Number as IntlNumber} from 'react-intl'; or… import * as ReactIntl from 'react-intl'; |
@caridy any thoughts on this? |
🍹 |
This adds "Formatted" as a prefix to all React Intl Components. See: formatjs#65 for discussion Closes formatjs#64 Fixes formatjs#60
Refactor: using ES6 and transpiring to global and CommonJS
This is a feature request to export the Number/Date/Mixin components as IntlNumber/IntlDate/Mixin.
I love using the ES6 object destructuring syntax, but when I'm consuming react-intl components I cannot use it because it would "hide" the built in Number/Date types. Mixin is slightly different in that there is no conflict -- I just always rename it to IntlMixin to make it a bit more clear about it's use.
I'd love to be able to do the following.
Instead of
And if you end up going this route, I'd probably prefix the other ones with Intl for consistency.
The text was updated successfully, but these errors were encountered: