Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import ConnectedComponent from './ConnectedComponent';
  2. import {connect} from 'react-redux';
  3. import {injectIntl, defineMessages} from 'react-intl';
  4.  
  5. const messages = defineMessages({
  6. LABEL: {id: "CONNECTED.COMPONENT.LABEL", defaultMessage: "Label"},
  7. });
  8.  
  9. const mapStateToProps = (state, ownProps) => {
  10. const { intl } = ownProps;
  11. return {
  12. inputLabel: intl.formatMessage(messages.LABEL),
  13. };
  14. };
  15.  
  16. export default injectIntl(connect(
  17. mapStateToProps
  18. )(ConnectedComponent));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement