1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 1x 1x 1x 1x | import React from 'react'; import debug from 'debug'; export default class BaseComponent extends React.Component { constructor(props){ super(props); this.name = 'base-component'; this.log = debug(`px:${this.name}`); this.log('constructor'); } componentWillMount(){ this.log('componentWillMount', this); } componentDidMount(){ this.log('componentDidMount', this); } } |