(legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState)
| 8200 | } |
| 8201 | |
| 8202 | var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) { |
| 8203 | var cacheContext = legacyContext.cacheContext, |
| 8204 | getMaskedContext = legacyContext.getMaskedContext, |
| 8205 | getUnmaskedContext = legacyContext.getUnmaskedContext, |
| 8206 | isContextConsumer = legacyContext.isContextConsumer, |
| 8207 | hasContextChanged = legacyContext.hasContextChanged; |
| 8208 | |
| 8209 | // Class component state updater |
| 8210 | |
| 8211 | var updater = { |
| 8212 | isMounted: isMounted, |
| 8213 | enqueueSetState: function (instance, partialState, callback) { |
| 8214 | var fiber = get(instance); |
| 8215 | callback = callback === undefined ? null : callback; |
| 8216 | { |
| 8217 | warnOnInvalidCallback$1(callback, 'setState'); |
| 8218 | } |
| 8219 | var expirationTime = computeExpirationForFiber(fiber); |
| 8220 | var update = { |
| 8221 | expirationTime: expirationTime, |
| 8222 | partialState: partialState, |
| 8223 | callback: callback, |
| 8224 | isReplace: false, |
| 8225 | isForced: false, |
| 8226 | capturedValue: null, |
| 8227 | next: null |
| 8228 | }; |
| 8229 | insertUpdateIntoFiber(fiber, update); |
| 8230 | scheduleWork(fiber, expirationTime); |
| 8231 | }, |
| 8232 | enqueueReplaceState: function (instance, state, callback) { |
| 8233 | var fiber = get(instance); |
| 8234 | callback = callback === undefined ? null : callback; |
| 8235 | { |
| 8236 | warnOnInvalidCallback$1(callback, 'replaceState'); |
| 8237 | } |
| 8238 | var expirationTime = computeExpirationForFiber(fiber); |
| 8239 | var update = { |
| 8240 | expirationTime: expirationTime, |
| 8241 | partialState: state, |
| 8242 | callback: callback, |
| 8243 | isReplace: true, |
| 8244 | isForced: false, |
| 8245 | capturedValue: null, |
| 8246 | next: null |
| 8247 | }; |
| 8248 | insertUpdateIntoFiber(fiber, update); |
| 8249 | scheduleWork(fiber, expirationTime); |
| 8250 | }, |
| 8251 | enqueueForceUpdate: function (instance, callback) { |
| 8252 | var fiber = get(instance); |
| 8253 | callback = callback === undefined ? null : callback; |
| 8254 | { |
| 8255 | warnOnInvalidCallback$1(callback, 'forceUpdate'); |
| 8256 | } |
| 8257 | var expirationTime = computeExpirationForFiber(fiber); |
| 8258 | var update = { |
| 8259 | expirationTime: expirationTime, |
no test coverage detected