Skip to content

Instantly share code, notes, and snippets.

@dima117
Last active September 25, 2019 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dima117/6820e97a9e95ce11c1cd70e69502cf0b to your computer and use it in GitHub Desktop.
Save dima117/6820e97a9e95ce11c1cd70e69502cf0b to your computer and use it in GitHub Desktop.
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