daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dispatch(action) {
  2.   if (!isPlainObject(action)) {
  3.     throw new Error(
  4.       'Actions must be plain objects. ' +
  5.         'Use custom middleware for async actions.'
  6.     )
  7.   }
  8.  
  9.   if (typeof action.type === 'undefined') {
  10.     throw new Error(
  11.       'Actions may not have an undefined "type" property. ' +
  12.         'Have you misspelled a constant?'
  13.     )
  14.   }
  15.  
  16.   if (isDispatching) {
  17.     throw new Error('Reducers may not dispatch actions.')
  18.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top