Isn't this supposed to work with react + redux?
See original GitHub issueHi @jamuhl ,
Isn’t react-i18next supposed to work with react redux? For some reason, while I do:
export default class Root extends Component {
render() {
const { store, history } = this.props;
return(
<I18nextProvider i18n={i18n}>
<Provider store={store}>
<Router history={history} routes={routes} />
</Provider>
</I18nextProvider>
);
}
}
t is not passed via this.props and I am getting that t is undefined. Most likely I am missing something here and I am initializing I18nextProvider incorrectly , but still… do you have any idea/suggestion?
Thanks in advance,
KR,
Ricco
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
When (and when not) to use Redux - LogRocket Blog
Don't get me wrong; React is great alone. Yes, it's possible to write a complete application using nothing but a framework. But as...
Read more >Redux Fundamentals, Part 5: UI and React
React lets you describe your UI as a function of your state, and Redux contains state and updates it in response to actions....
Read more >React-Redux - Why isn't my state maintaining following ...
Your reducer should return an object, not an array. const MyName = (state = {}, action) => { console.log("REDUCER - action.
Read more >Redux vs. React Context: Which Should You Use? - fireup.pro
At the time of writing this article, the interface of Context API isn't optimized for high-frequency updates. You can face this issue when ......
Read more >Do React Hooks Replace Redux?. TL;DR - Medium
You can and should use React hooks to get deterministic state updates, but that's ... “Does determinism break if everything isn't in Redux?...
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

The provider does only pass i18n instance to to context - you need to use the translate hoc to pass t to your components. https://react.i18next.com/components/translate-hoc.html
Unfortunately this project is not available to public as it is protected by NDA 😕, but I will try at least the example project, though I am quite sure that it will work (for that reason we have examples 😃 )
KR,
Ricco