react-beautiful-dnd
Version:
A beautiful, accessible drag and drop library for lists with React.js
18 lines (12 loc) • 439 B
JavaScript
// @flow
/* eslint-disable no-console */
import type { Store, Action, State } from '../types';
export default (store: Store) => (next: (Action) => mixed) => (action: Action): mixed => {
console.group(`action: ${action.type}`);
const before: State = store.getState();
const result: mixed = next(action);
const after: State = store.getState();
console.log({ action, before, after });
console.groupEnd();
return result;
};