react-component-log
Version:
HOC for easied debugging/learning of lifecycle methods for React components
25 lines (17 loc) • 1.28 kB
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _printLevel$shouldPri;
var _constants = require('./constants');
var _constants2 = _interopRequireDefault(_constants);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var printLevel = 'log';
var shouldPrint = function shouldPrint() {
return true;
};
exports.default = (_printLevel$shouldPri = {
printLevel: printLevel,
shouldPrint: shouldPrint
}, _defineProperty(_printLevel$shouldPri, _constants2.default.WILL_MOUNT, true), _defineProperty(_printLevel$shouldPri, _constants2.default.DID_MOUNT, true), _defineProperty(_printLevel$shouldPri, _constants2.default.WILL_RECEIVE_PROPS, true), _defineProperty(_printLevel$shouldPri, _constants2.default.SHOULD_UPDATE, true), _defineProperty(_printLevel$shouldPri, _constants2.default.WILL_UPDATE, true), _defineProperty(_printLevel$shouldPri, _constants2.default.DID_UPDATE, true), _defineProperty(_printLevel$shouldPri, _constants2.default.WILL_UNMOUNT, true), _printLevel$shouldPri);