Last active
September 25, 2019 14:08
-
-
Save dima117/6820e97a9e95ce11c1cd70e69502cf0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const createMyMiddleware = (): Middleware => { | |
return (store: MiddlewareAPI<Dispatch, Store>) => { | |
return (next: Dispatch) => { | |
return (action: ReduxAction) => { | |
// можнно выполнить действия до редюсеров | |
const result = next(action); | |
// а можнно и после | |
return result; | |
}; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment