1. function ComponentDummy() {}
    2. ComponentDummy.prototype = Component.prototype;
    3. function PureComponent(props, context, updater) {
    4. this.props = props;
    5. this.context = context;
    6. // If a component has string refs, we will assign a different object later.
    7. this.refs = emptyObject;
    8. this.updater = updater || ReactNoopUpdateQueue;
    9. }
    10. const pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
    11. pureComponentPrototype.constructor = PureComponent;
    12. // Avoid an extra prototype jump for these methods.
    13. Object.assign(pureComponentPrototype, Component.prototype);
    14. pureComponentPrototype.isPureReactComponent = true;