diff --git a/src/store.ts b/src/store.ts index 8ea3bee76..b9677516f 100644 --- a/src/store.ts +++ b/src/store.ts @@ -14,11 +14,29 @@ const store = configureStore({ reducer: rootReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ - // TODO: Go through reducers and see why the state is not immutable nor serializable. - // These were not checked prior to the adoption of Redux Toolkit, and were not - // investigated to minimize conversion efforts. - immutableCheck: false, - serializableCheck: false + immutableCheck: { + ignoredPaths: [ + // Immutability can't be checked here because of circular references. + 'tree', + 'treeToo', + ], + }, + serializableCheck: { + ignoredPaths: [ + // Serializability can't be checked here because of circular references + 'tree', + 'treeToo', + // FIXME: Find other circular references - still getting "Maximum call stack size exceeded" error. + + // These values are non-serializable by design. + 'entropy', + 'controls.defaults.tipLabelKey', + 'controls.tipLabelKey', + 'controls.coloringsPresentOnTree', + 'controls.coloringsPresentOnTreeWithConfidence', + 'controls.colorScale.scale', + ], + }, }).concat(middleware), devTools: process.env.NODE_ENV !== 'production', })