With next-redux-saga and next-redux-wrapper
See original GitHub issueHello, next-i18next seem to work good, but as I configure it in _app.js like this, redux saga stops loading data, requests won’t fire.
When I look into component, there are initialProps data, but redux-saga is not working
Dunno, if this is issue, or I am missing something
(end of _app.js)
const withTranslation = appWithTranslation(MyApp)
const componentWithRedux = connect(store => ({
user: store.user,
}))(withTranslation)
export default withRedux(initStore)(withReduxSaga(componentWithRedux))
Issue Analytics
- State:
- Created 5 years ago
- Comments:34 (19 by maintainers)
Top Results From Across the Web
kirill-konshin/next-redux-wrapper: Redux wrapper for Next.js
This is where next-redux-wrapper comes in handy: It automatically creates the store instances for you and makes sure they all have the same...
Read more >Perfect combo Next & Redux-Saga
So, we need next-redux-wrapper library. It automatically creates the store instances for you and makes sure they all have the same state.
Read more >next-redux-saga examples - CodeSandbox
Learn how to use next-redux-saga by viewing and forking next-redux-saga example apps on CodeSandbox. ... with-redux-wrapper.
Read more >How to use "next-redux-wrapper" with "Next.js", "Redux ...
2 Answers 2 · wrapper creates a new server side redux store with makeStore function · wrapper dispatches HYDRATE action. Its payload is...
Read more >Next-redux-saga - npm.io
To be consistent with how Next.js works, next-redux-saga defaults to sync mode in version 2.x. When you trigger a route change on the...
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
Thanks everyone for helping us along with the process of developing young OSS, by the way! I know it can be frustrating.
From playing around a bit, it seems like you just need to make sure you put your
withRedux
beforeappWithTranslation
, presumably so that the store exists by the timeappWithTranslation
is called.I haven’t used Redux in a professional project for over a year now, so I don’t really remember how all these patterns work. Isn’t it expected that the order of HOCs matters? Is the bug here that you want to be able to use HOCs in any order, or is it something else?