const mapStateToProps = state => {
const { error } = state.Login;
return { error };
}
export default compose(withRouter(withNamespaces()), connect(
mapStateToProps,
))(ProfileMenu);
**It's not working with the i18next, without it yes, how to fix?
compose
is a functional method which composes functions with each other.
Try this:
export default compose(withRouter(), withNamespaces(), connect(mapStateToProps))(ProfileMenu);