UNPKG

@bengo.co/typescript-web-starter

Version:

A simple website project written in TypeScript. Use this as a starting point for your project.

13 lines (11 loc) 322 B
/** * Redux middleware to log all actions */ import { Action, Middleware, Store } from "redux"; import { log } from "../../log"; export const logger: Middleware = <S, A extends Action>(store: Store<S, A>) => { return next => (action: Action) => { log("info", "[redux logger]", action); return next(action); }; };