SHARE
TWEET

Untitled

a guest Jul 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const triggerDispatchs = action => {
  2.     const dispatchs = [counterDispatch, authDispatch];
  3.     for (let i = 0; i < dispatchs.length; i++) {
  4.       dispatchs[i](action);
  5.     }
  6.   };
  7.  
  8.   const middlewareContrutor = action => {
  9.     middleware(action)(triggerDispatchs);
  10.   };
  11.  
  12.   const combinedReducers = {
  13.     store: {
  14.       ...counterState,
  15.       ...authState
  16.     },
  17.     dispatch: middlewareContrutor
  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