vn-verdnaturachat/app/sagas/logger.js

13 lines
325 B
JavaScript
Raw Normal View History

2017-08-17 06:28:41 +00:00
import { select, takeEvery } from 'redux-saga/effects';
const root = function* watchAndLog() {
yield takeEvery('*', function* logger(action) {
const state = yield select();
const tmp = { ...state };
delete tmp.settings;
console.log('action', action);
console.log('state after', tmp);
});
};
export default root;