Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function init(...middleware) {
if (registry) {
throw new Error('store already initialized');
}
registry = new ReducerRegistry({}, [promiseMiddleware(), ...middleware]);
//If you want to register all of your reducers, this is good place.
/*
* registry.register({
* someName: (state, action) => ({...state})
* });
*/
return registry;
}