Open ezlo-lesiam opened 1 year ago
The application has loaded and the state is in Redux
Moved the element and then Redux DevTools crashed
My Redux DevTools connection code
import { createStore, applyMiddleware, compose } from 'redux'; import reducer from 'src/redux/reducer'; import { sideEffects } from 'src/redux/middleware'; const enhancers = []; export const configureStore = () => { const devToolsExtension = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; if (typeof devToolsExtension === 'function') { enhancers.push(devToolsExtension()); } const composedEnhancers = compose(applyMiddleware(sideEffects), ...enhancers); return createStore(reducer, composedEnhancers); };
My Middleware:
import { STORE_RAPPID } from 'src/redux/helpers/actionTypes'; import { SharedEvents } from 'src/rappid/controller'; import { importGraphFromJSON } from 'src/rappid/actions'; import { onGraphStartBatch, onGraphStopBatch } from 'src/rappid/controllers'; export const sideEffects = ({ getState }: { getState: Function }) => { return (next: Function) => (action: { type: string, payload: any }) => { if (action.type === STORE_RAPPID) { return next(action); } const { rappid } = getState(); if (rappid) { switch (action.type) { case SharedEvents.JSON_EDITOR_CHANGED: const json = action.payload; importGraphFromJSON(rappid, json); break; case SharedEvents.GRAPH_START_BATCH: onGraphStartBatch(rappid, action.payload); break; case SharedEvents.GRAPH_STOP_BATCH: onGraphStopBatch(rappid, action.payload); } } return next(action); }; };
After Redux DevTools crashes, my application works fine and Redux keeps all the changes. Help please.
hi @ezlo-lesiam Did you solve the problem? I have the same one too
The application has loaded and the state is in Redux![image](https://user-images.githubusercontent.com/94382906/214610204-4aba15fa-5bd4-42c4-b6ac-6fe1f0c84d19.png)
Moved the element and then Redux DevTools crashed![image](https://user-images.githubusercontent.com/94382906/214610470-6236c990-4160-41a9-9319-c153cf17ea69.png)
My Redux DevTools connection code
My Middleware:
After Redux DevTools crashes, my application works fine and Redux keeps all the changes. Help please.