undux
Version:
Dead simple state management for React
12 lines • 518 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withLogger = void 0;
function withLogger(store) {
store.onAll().subscribe(function (_a) {
var key = _a.key, previousValue = _a.previousValue, value = _a.value;
console.info("%c \u2941 ".concat(String(key)), 'background-color: rgb(96, 125, 139); color: #fff; padding: 2px 8px 2px 0;', previousValue, '→', value);
});
return store;
}
exports.withLogger = withLogger;
//# sourceMappingURL=withLogger.js.map