This is a pre-release that changes the main API (in a backwards compatible way) to focus on using React Components for formatting, instead of calling methods provided by the React Intl Mixin.
You can now do things like this:
var MyComponent = React.createClass({
mixins: [ReactIntl.Mixin],
render: function () {
return (
<p><ReactIntl.Number style="percent">{0.95}</ReactIntl.Number></p>
<p>
<ReactIntl.IntlMessage
product="apples"
price={2000.15}
deadline={new Date()}
timeZone="UTC">
{this.getIntlMessage('SHORT')}
</ReactIntl.IntlMessage>
</p>
);
}
});
Please test out the new components and provide us feedback so we can ship v1.1.0
GA.
See: #24 for more details
$ npm install react-intl@next