我的页面已连接到redux存储,如下所示:
export default withRouter(
connect(
mapStateToProps,
{ postResendEmailConfirmation, getEmailVerificationCheck, getPermissions }
)(Welcome))
);
按照教程并添加配置后,我已经导入:
import { withNamespaces } from 'react-i18next';
但是我不知道如何连接两者。我是这样做的:
export default withRouter(
connect(
mapStateToProps,
{ postResendEmailConfirmation, getEmailVerificationCheck, getPermissions }
)(withNamespaces('translations')(Welcome))
);
但错误是:
Component.js:144 [React-imported-component] TypeError: (0 , _reactI18next.withNamespaces) is not a function