Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- How to use:
- 1. Inside React Dev Tools select <Provider>
- 2. Copy this script
- 3. Paste to console
- 4. Run
- */
- let store = $r.store;
- let rawDispatch = store.dispatch;
- $r.store.dispatch = (action) => {
- console.group(action.type);
- console.log('%c prev state', 'color: gray', store.getState());
- console.log('%c action', 'color:blue', action);
- const returnValue = rawDispatch(action);
- console.log('%c next state', 'color: green', store.getState());
- console.groupEnd(action.type);
- return returnValue;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement