Skip to content

Instantly share code, notes, and snippets.

@egebilican
Created March 28, 2019 08:33
Show Gist options
  • Save egebilican/03f153a3a75372048881886e5f1cc512 to your computer and use it in GitHub Desktop.
Save egebilican/03f153a3a75372048881886e5f1cc512 to your computer and use it in GitHub Desktop.
INTL-injected
import React from "react";
import { messages } from "./messages";
import { injectIntl } from "react-intl";
class InjectedGreeter extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const { intl } = this.props;
return (
<div>
<input placeholder={intl.formatMessage(messages.simpleInjectedExample, { name: "Ege" })} />
</div>
);
}
}
export default injectIntl(InjectedGreeter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment