(legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState)
| 8451 | } |
| 8452 | |
| 8453 | var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) { |
| 8454 | var cacheContext = legacyContext.cacheContext, |
| 8455 | getMaskedContext = legacyContext.getMaskedContext, |
| 8456 | getUnmaskedContext = legacyContext.getUnmaskedContext, |
| 8457 | isContextConsumer = legacyContext.isContextConsumer, |
| 8458 | hasContextChanged = legacyContext.hasContextChanged; |
| 8459 | |
| 8460 | // Class component state updater |
| 8461 | |
| 8462 | var updater = { |
| 8463 | isMounted: isMounted, |
| 8464 | enqueueSetState: function (instance, partialState, callback) { |
| 8465 | var fiber = get(instance); |
| 8466 | callback = callback === undefined ? null : callback; |
| 8467 | { |
| 8468 | warnOnInvalidCallback$1(callback, 'setState'); |
| 8469 | } |
| 8470 | var expirationTime = computeExpirationForFiber(fiber); |
| 8471 | var update = { |
| 8472 | expirationTime: expirationTime, |
| 8473 | partialState: partialState, |
| 8474 | callback: callback, |
| 8475 | isReplace: false, |
| 8476 | isForced: false, |
| 8477 | capturedValue: null, |
| 8478 | next: null |
| 8479 | }; |
| 8480 | insertUpdateIntoFiber(fiber, update); |
| 8481 | scheduleWork(fiber, expirationTime); |
| 8482 | }, |
| 8483 | enqueueReplaceState: function (instance, state, callback) { |
| 8484 | var fiber = get(instance); |
| 8485 | callback = callback === undefined ? null : callback; |
| 8486 | { |
| 8487 | warnOnInvalidCallback$1(callback, 'replaceState'); |
| 8488 | } |
| 8489 | var expirationTime = computeExpirationForFiber(fiber); |
| 8490 | var update = { |
| 8491 | expirationTime: expirationTime, |
| 8492 | partialState: state, |
| 8493 | callback: callback, |
| 8494 | isReplace: true, |
| 8495 | isForced: false, |
| 8496 | capturedValue: null, |
| 8497 | next: null |
| 8498 | }; |
| 8499 | insertUpdateIntoFiber(fiber, update); |
| 8500 | scheduleWork(fiber, expirationTime); |
| 8501 | }, |
| 8502 | enqueueForceUpdate: function (instance, callback) { |
| 8503 | var fiber = get(instance); |
| 8504 | callback = callback === undefined ? null : callback; |
| 8505 | { |
| 8506 | warnOnInvalidCallback$1(callback, 'forceUpdate'); |
| 8507 | } |
| 8508 | var expirationTime = computeExpirationForFiber(fiber); |
| 8509 | var update = { |
| 8510 | expirationTime: expirationTime, |
no test coverage detected