MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getUndefinedStateErrorMessage

Function getUndefinedStateErrorMessage

code/redux/public/app.js:21244–21249  ·  view source on GitHub ↗
(key, action)

Source from the content-addressed store, hash-verified

21242function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
21243
21244function getUndefinedStateErrorMessage(key, action) {
21245 var actionType = action && action.type;
21246 var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
21247
21248 return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
21249}
21250
21251function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
21252 var reducerKeys = Object.keys(reducers);

Callers 1

combineReducersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected