-
Notifications
You must be signed in to change notification settings - Fork 3
call parent static function
Hill Liu edited this page Feb 20, 2018
·
4 revisions
In your class
let superData;
if (super.constructor.calculateState) {
superData = super.constructor.calculateState(prevState);
} else {
superData = super.calculateState(prevState);
}
After Babel compile
var superData = void 0;
if (_ReshowComponent.constructor.calculateState) {
superData = _ReshowComponent.constructor.calculateState(prevState);
} else {
superData = _ReshowComponent.calculateState.call(this, prevState);
}