-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure v2 works with applyMiddlaware #260
Comments
This should be supported with compose, just needs to be documented. We also need a migration guide since it might be slightly confusing if someone was using middleware before. Will leave it here as a reference for missing doc |
Just did a testdrive with the alpha. I'm guessing this is the reason why actions in the renderer process are not picked up by redux-logger and redux-observable middleware, correct? EDIT: I've applied a quick fix in the |
@Superjo149 I haven't had a chance to test drive it with |
I just tried adding the `redux-logger as middleware to the renderer store on our tests, it works as expected: import { createStore, compose, applyMiddleware } from 'redux'
import { reducer } from '../../counter'
import { rendererStateSyncEnhancer } from 'electron-redux'
import logger from 'redux-logger'
const middlewareEnhancer = applyMiddleware(logger)
const composedEnhancers = compose(middlewareEnhancer, rendererStateSyncEnhancer())
const store = createStore(reducer, composedEnhancers) |
I did some more investigating, and I do think this is the way to go instead of adding a 3rd argument to the createStore function. This is how it is also done in |
@Superjo149 This change makes sense, and it would be a good thing to follow same principles as other libs - if you would like to, feel free to open a pull request for that change 👍🏻 Please use the |
@matmalkowski Allright, I will. I also did some more investigating into my other issue. It is possibly related specifically to the usage with |
Right now the only way to use the syncMain is to pass it as storeEnchancer to store creator:
Its not possible to use it with applyMiddleware (probably need to
applyMiddleware
+compose
- but it might be moreThe text was updated successfully, but these errors were encountered: