Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const triggerDispatchs = action => {
- const dispatchs = [counterDispatch, authDispatch];
- for (let i = 0; i < dispatchs.length; i++) {
- dispatchs[i](action);
- }
- };
- const middlewareContrutor = action => {
- middleware(action)(triggerDispatchs);
- };
- const combinedReducers = {
- store: {
- ...counterState,
- ...authState
- },
- dispatch: middlewareContrutor
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement