import { Store, Dispatch, Action } from "redux";

const logger = (store: Store) => (next: Dispatch) => (action: Action) => {
  const { getState } = store;
  const beforeActionState = getState();
  const result = next(action);
  const afterActionState = getState();
  console.info(
    "action",
    action,
    "beforeState",
    beforeActionState,
    "afterState",
    afterActionState
  );
  return result;
};
export default logger;

import { Store, Dispatch, Action } from "redux";

const crashReporter = (store: Store) => (next: Dispatch) => (
  action: Action
) => {
  const { getState } = store;
  const beforeActionState = getState();
  const result = next(action);
  const afterActionState = getState();
  console.info(
    "action",
    action,
    "beforeState",
    beforeActionState,
    "afterState",
    afterActionState
  );
  return result;
};
export default crashReporter;

--- 
+++ 
@@ -1,8 +1,6 @@
 import { Store, Dispatch, Action } from "redux";
 
-const crashReporter = (store: Store) => (next: Dispatch) => (
-  action: Action
-) => {
+const logger = (store: Store) => (next: Dispatch) => (action: Action) => {
   const { getState } = store;
   const beforeActionState = getState();
   const result = next(action);
@@ -17,4 +15,4 @@
   );
   return result;
 };
-export default crashReporter;
+export default logger;
Change name to match middlware behavior
