Title / Description
Code export function injectAsyncReducer(store, isValid) { return function injectReducer(name, asyncReducer) { if (!isValid) checkStore(store); invariant( isString(name) && !isEmpty(name) && isFunction(asyncReducer), '(app/utils...) injectAsyncReducer: Expected `asyncReducer` to be a reducer function' ); if (Reflect.has(store.asyncReducers, name)) return; store.asyncReducers[name] = asyncReducer; // eslint-disable-line no-param-reassign store.replaceReducer(createReducer(store.asyncReducers)); }; }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code