Make sure v2 works with applyMiddlaware
See original GitHub issueRight now the only way to use the syncMain is to pass it as storeEnchancer to store creator:
const store = createStore(reducer, syncMain)
Its not possible to use it with applyMiddleware (probably need to applyMiddleware
+ compose
- but it might be more
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
applyMiddleware - Redux
Each middleware receives Store 's dispatch and getState functions as named arguments, and returns a function. That function will be given the ...
Read more >javascript - How does react redux's #applyMiddleware ensure ...
It returns a new #createStore, but this method can be used as a parameter again in another #applyMiddleware just as store can be...
Read more >API Reference: ApolloServer - Apollo GraphQL Docs
This article documents the ApolloServer class from the @apollo/server package. You can use the ApolloServer class to create an instance of Apollo Server ......
Read more >middleware is not a function · Issue #35 · reduxjs/redux-thunk
I have a store like this: const store = compose( applyMiddleware( thunk, ... Also make sure you're using 2.x.
Read more >Redux Middleware/Async/Thunk: The complete Guide
This video I will be covering middleware and asynchronous actions within React/Redux. We'll cover why we need to ... 44K views 2 years...
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 FreeTop 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
Top GitHub Comments
I had to do 2 things, but I do not fully understand why. I believe that indeed the actions are dispatched in the other process, but they weren’t picked up by the middleware when coming from the other process. I think this issue is specifically for actions which need to be dispatched and run inside the middleware of the renderer process, but I have to do more testing to be sure. With the fixes, they do dispatch and get handled correctly. Firstly, for the compose, I had to place my middleware first, then the other enhancers. Then, I patched the package like this
@matmalkowski Allright, I will. I also did some more investigating into my other issue. It is possibly related specifically to the usage with
redux-observable
. I hope I can provide some input and possible fix for this soon.