Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...additionalReducers,
};
}
const sagaMiddleware = createSagaMiddleware();
const middlewares = [sagaMiddleware];
const additionalMiddlewares = additionalConfiguration.middlewares;
if (additionalMiddlewares) {
middlewares.push(...additionalMiddlewares);
}
const store = cmfStore.initialize(reducers, initialState, undefined, middlewares);
sagaMiddleware.run(rootSaga);
api.registerInternals();
/**
* Register route functions
*/
const additionalRouteFunctions = additionalConfiguration.routeFunctions;
if (additionalRouteFunctions) {
Object.keys(additionalRouteFunctions).map(k =>
registerRouteFunction(k, additionalRouteFunctions[k]),
);
}
registerAllContainers();
dataset.configure();
/**
super(props);
let state;
if (props) {
state = props.state;
}
if (!state) {
state = mock.state();
}
let middlewares = this.props.middleware;
if (props.sagaMiddleware) {
middlewares = middlewares.concat([props.sagaMiddleware]);
}
this.store = store.initialize(props.reducer, state, props.enhancer, middlewares);
if (props.sagaMiddleware) {
api.registerInternals();
props.sagaMiddleware.run(initSagaMiddleWare);
}
}
...additionalReducers,
};
}
const sagaMiddleware = createSagaMiddleware();
const middlewares = [sagaMiddleware];
const additionalMiddlewares = additionalConfiguration.middlewares;
if (additionalMiddlewares) {
middlewares.push(...additionalMiddlewares);
}
const store = cmfStore.initialize(reducers, preloadedState, undefined, middlewares);
sagaMiddleware.run(rootSaga);
api.registerInternals();
/**
* Register route functions
*/
const additionalRouteFunctions = additionalConfiguration.routeFunctions;
if (additionalRouteFunctions) {
Object.keys(additionalRouteFunctions).map(k =>
registerRouteFunction(k, additionalRouteFunctions[k]),
);
}
registerAllContainers();
dataset.configure();
/**