UNPKG

react-beautiful-dnd-next

Version:

Beautiful and accessible drag and drop for lists with React

19 lines (14 loc) 468 B
// @flow /* eslint-disable no-console */ import type { Action, Store } from '../../state/store-types'; export default (store: Store) => (next: Action => mixed) => ( action: Action, ): any => { console.group(`action: ${action.type}`); console.log('action payload', action.payload); console.log('state before', store.getState()); const result: mixed = next(action); console.log('state after', store.getState()); console.groupEnd(); return result; };