redux-devtools
redux-devtools copied to clipboard
Redux DevTools crashes after I start changing redux state.
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