We have been using react, react router, and redux. Now we want to add injectIntl. I am getting a problem with my syntax and hoping you could help.
import React, { Fragment } from 'react';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import { intlShape, injectIntl } from 'react-intl';
...
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MyComponent));
and I changed it to be
export default injectIntl(withRouter(connect(mapStateToProps, mapDispatchToProps)(MyComponent)));
The error is
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.
What do I need to do to combine all these frameworks?