How to use this library when using redux?
See original GitHub issuemy page is connected to a redux store, like so:
export default withRouter(
connect(
mapStateToProps,
{ postResendEmailConfirmation, getEmailVerificationCheck, getPermissions }
)(Welcome))
);
After following a tutorial and adding the configuration, I have imported:
import { withNamespaces } from 'react-i18next';
but I don’t how how to connect the two. I did this:
export default withRouter(
connect(
mapStateToProps,
{ postResendEmailConfirmation, getEmailVerificationCheck, getPermissions }
)(withNamespaces('translations')(Welcome))
);
but the error is:
Component.js:144 [React-imported-component] TypeError: (0 , _reactI18next.withNamespaces) is not a function
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Redux Fundamentals, Part 5: UI and React
Redux is a standalone JS library. As we've already seen, you can create and use a Redux store even if you don't have...
Read more >Understanding Redux: A tutorial with examples
In this tutorial, we'll show you what Redux is, why you should use it, and how it works. We'll demo using a simple...
Read more >I wonder if I can have a redux store in the library and the App ...
Yes it is possible. To keep it simple, library is completely independent package where you can use the redux in ...
Read more >Introduction to React Redux Library
In this lesson, we will learn how to use the React Redux library, which contains the official bindings for adding Redux to a...
Read more >Setting up the 'react-redux' library - Thinkster.io
The react-redux module is the "official bindings" between react and redux. It adds some useful syntactic sugar for binding your components to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You have an issue with your parenthesis:
(withTranslation('translations'))(Welcome)
should be(withTranslation('translations')(Welcome))
what version of react-i18next? -> latest would use
withTranslation
-> https://react.i18next.com/latest/migrating-v9-to-v10#components-v9-greater-than-v10