-
Notifications
You must be signed in to change notification settings - Fork 3
Usage with redux-devtools #2
Comments
I've never really bothered with the Redux dev tools. Is there something special required to use them? |
Yes I think there is. I got it working with [email protected] with the following. It is not working without the usage of
If I use your lib I can make it work without using redux-devtools or in a way that I can see the actions in the devtools but then they are not transfered between renderer and main process in electron anymore. And I want to have both of course :-) |
import { syncRenderer } from "@mckayla/electron-redux";
const composeEnhancers =
(...enhancers) =>
(createStore) =>
enhancers.reduce((createStore, enhancer) => enhancer(createStore), createStore);
export const store = createStore(
reducer,
composeEnhancers(
syncRenderer,
applyMiddleware(thunk),
devToolsEnhancer(),
),
); I tested out this idea with redux-thunk and it seems to work! can you try getting the dev tools working this way? If this is sufficient, I might start shipping this little |
actually wait, I wish I had've googled this first, Redux exports a |
Hey, The redux I think that's the reason why they introduced the function composeWithStateSync in electron-redux. Without it you have the same problems there. s. klarna#285 and klarna#296 I don't have deep insights in how this all works, but to me it seems that the actions are getting lost, if we use the redux devtools and electron-redux together. In the linked PR the |
Hey @aslilac,
I stumbled across your lib when I was looking for a replacement for klarna/electron-redux. I have an electron app with react, which I need to update to electron >= 14.
I got your lib working but now have problems with getting the redux devtools ready. Do you got it working with your lib?
I think the problem is the order of StoreEnhancers and call of compose functions. klarna/electron-redux have a possible solution for this in their 2.0 alpha branch, but it is not maintained anymore.
The text was updated successfully, but these errors were encountered: