demo/preact-dbmon/dbmon.js
function setState(state, callback) {
      var s = this.state;
      if (!this.prevState) this.prevState = extend({}, s);
      extend(s, typeof state === 'function' ? state(s, this.props) : state);
      if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
      enqueueRender(this);
    }
function setState(state, callback) {
      var s = this.state;
      if (!this.prevState) this.prevState = extend({}, s);
      extend(s, typeof state === 'function' ? state(s, this.props) : state);
      if (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);
      enqueueRender(this);
    }
function setState ( state , callback ) { var s = this . state ; if ( ! this . prevState ) this . prevState = extend ( { } , s ) ; extend ( s , typeof state === 'function' ? state ( s , this . props ) : state ) ; if ( callback ) ( this . _renderCallbacks = this . _renderCallbacks || [ ] ) . push ( callback ) ; enqueueRender ( this ) ; }
Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.
@param {object} nextProps
@param {object} nextState
@param {object} nextContext
@return {Boolean} should the component re-render
@name shouldComponentUpdate
@function
 Update component state by copying properties from `state` to `this.state`.
@param {object} state		A hash of state properties to update with new values
@param {function} callback	A function to be called once component state is updated
Returns a boolean indicating if the component should re - render when receiving the given props and state .