Edition via drag & drop des items
This commit is contained in:
15
js/store/middlewares/logger.js
Normal file
15
js/store/middlewares/logger.js
Normal file
@ -0,0 +1,15 @@
|
||||
var debug = require('../../util/debug')('store:logger');
|
||||
|
||||
module.exports = function loggerMiddleware(store) {
|
||||
return function(next) {
|
||||
return function(action) {
|
||||
debug('Action %j', action);
|
||||
debug('Store current state %j', store.getState());
|
||||
next(action);
|
||||
debug('Store new state %j', store.getState());
|
||||
if(action.error) {
|
||||
console.error(action.error.stack || action.error);
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user