欢迎光临散文网 会员登陆 & 注册

贪心 CVTranformer研修

2022-11-10 20:10 作者:三国尽归许佳琪  | 我要投稿

function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) { // ??? checkShouldComponentUpdate 什么时候调用  const instance = workInProgress.stateNode;  if(typeof instance.shouldComponentUpdate === 'function') {    const shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newxtContext);    return shouldUpdate;  }  if(ctor.prototype && ctor.prototype.isPureReactComponent) {    return (!shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)); x}

贪心 CVTranformer研修的评论 (共 条)

分享到微博请遵守国家法律