How to use the react-intl.IntlMixin function in react-intl

To help you get started, we’ve selected a few react-intl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ianobermiller / nuclearmail / src / RelativeDate.js View on Github external
render(): any {
    return (
      <div title="{this.formatDate(," style="{}">

RelativeDate.contextTypes = IntlMixin.contextTypes;
RelativeDate.childContextTypes = IntlMixin.childContextTypes;

Object.keys(IntlMixin).forEach(key =&gt; {
  if (['propTypes', 'contextTypes'].indexOf(key) &gt;= 0) {
  RelativeDate.prototype[key] = IntlMixin[key];

module.exports = RelativeDate;