code: function createClassComponent(ctor, displayName, opts) {
    var cdu = createComponentDidUpdate(displayName, opts);
  
    // the wrapper class extends the original class,
    // and overwrites its `componentDidUpdate` method,
    // to allow why-did-you-update to listen for updates.
    // If the component had its own `componentDidUpdate`,
    // we call it afterwards.`
    var WDYUClassComponent = function (_ctor) {
      _inherits(WDYUClassComponent, _ctor);
  
      function WDYUClassComponent() {
        _classCallCheck(this, WDYUClassComponent);
  
        return _possibleConstructorReturn(this, _ctor.apply(this, arguments));
      }
  
      WDYUClassComponent.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState, snapshot) {
        cdu.call(this, prevProps, prevState);
        if (typeof ctor.prototype.componentDidUpdate === 'function') {
          ctor.prototype.componentDidUpdate.call(this, prevProps, prevState, snapshot);
        }
      };
  
      return WDYUClassComponent;
    }(ctor);
    // our wrapper component needs an explicit display name
    // based on the original constructor.
    WDYUClassComponent.displayName = displayName;
    return WDYUClassComponent;
  }
docs: Creates a wrapper for a React class component