(legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState)
| 7561 | } |
| 7562 | |
| 7563 | var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) { |
| 7564 | var cacheContext = legacyContext.cacheContext, |
| 7565 | getMaskedContext = legacyContext.getMaskedContext, |
| 7566 | getUnmaskedContext = legacyContext.getUnmaskedContext, |
| 7567 | isContextConsumer = legacyContext.isContextConsumer, |
| 7568 | hasContextChanged = legacyContext.hasContextChanged; |
| 7569 | |
| 7570 | // Class component state updater |
| 7571 | |
| 7572 | var updater = { |
| 7573 | isMounted: isMounted, |
| 7574 | enqueueSetState: function (instance, partialState, callback) { |
| 7575 | var fiber = get(instance); |
| 7576 | callback = callback === undefined ? null : callback; |
| 7577 | { |
| 7578 | warnOnInvalidCallback$1(callback, 'setState'); |
| 7579 | } |
| 7580 | var expirationTime = computeExpirationForFiber(fiber); |
| 7581 | var update = { |
| 7582 | expirationTime: expirationTime, |
| 7583 | partialState: partialState, |
| 7584 | callback: callback, |
| 7585 | isReplace: false, |
| 7586 | isForced: false, |
| 7587 | capturedValue: null, |
| 7588 | next: null |
| 7589 | }; |
| 7590 | insertUpdateIntoFiber(fiber, update); |
| 7591 | scheduleWork(fiber, expirationTime); |
| 7592 | }, |
| 7593 | enqueueReplaceState: function (instance, state, callback) { |
| 7594 | var fiber = get(instance); |
| 7595 | callback = callback === undefined ? null : callback; |
| 7596 | { |
| 7597 | warnOnInvalidCallback$1(callback, 'replaceState'); |
| 7598 | } |
| 7599 | var expirationTime = computeExpirationForFiber(fiber); |
| 7600 | var update = { |
| 7601 | expirationTime: expirationTime, |
| 7602 | partialState: state, |
| 7603 | callback: callback, |
| 7604 | isReplace: true, |
| 7605 | isForced: false, |
| 7606 | capturedValue: null, |
| 7607 | next: null |
| 7608 | }; |
| 7609 | insertUpdateIntoFiber(fiber, update); |
| 7610 | scheduleWork(fiber, expirationTime); |
| 7611 | }, |
| 7612 | enqueueForceUpdate: function (instance, callback) { |
| 7613 | var fiber = get(instance); |
| 7614 | callback = callback === undefined ? null : callback; |
| 7615 | { |
| 7616 | warnOnInvalidCallback$1(callback, 'forceUpdate'); |
| 7617 | } |
| 7618 | var expirationTime = computeExpirationForFiber(fiber); |
| 7619 | var update = { |
| 7620 | expirationTime: expirationTime, |
no test coverage detected