Closed EvgenyOrekhov closed 1 year ago
I ended up creating a middleware wrapper for that:
const conditionalStateSyncMiddleware: Middleware<unknown, RootState> =
store => next => action =>
store.getState().isStateSyncEnabled
? stateSyncMiddleware(store)(next)(action)
: next(action);
I need the ability to disable/enable syncing depending on a prop in Redux state. Is it possible?