(legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState)
| 8338 | } |
| 8339 | |
| 8340 | var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) { |
| 8341 | var cacheContext = legacyContext.cacheContext, |
| 8342 | getMaskedContext = legacyContext.getMaskedContext, |
| 8343 | getUnmaskedContext = legacyContext.getUnmaskedContext, |
| 8344 | isContextConsumer = legacyContext.isContextConsumer, |
| 8345 | hasContextChanged = legacyContext.hasContextChanged; |
| 8346 | |
| 8347 | // Class component state updater |
| 8348 | |
| 8349 | var updater = { |
| 8350 | isMounted: isMounted, |
| 8351 | enqueueSetState: function (instance, partialState, callback) { |
| 8352 | var fiber = get(instance); |
| 8353 | callback = callback === undefined ? null : callback; |
| 8354 | { |
| 8355 | warnOnInvalidCallback$1(callback, 'setState'); |
| 8356 | } |
| 8357 | var expirationTime = computeExpirationForFiber(fiber); |
| 8358 | var update = { |
| 8359 | expirationTime: expirationTime, |
| 8360 | partialState: partialState, |
| 8361 | callback: callback, |
| 8362 | isReplace: false, |
| 8363 | isForced: false, |
| 8364 | capturedValue: null, |
| 8365 | next: null |
| 8366 | }; |
| 8367 | insertUpdateIntoFiber(fiber, update); |
| 8368 | scheduleWork(fiber, expirationTime); |
| 8369 | }, |
| 8370 | enqueueReplaceState: function (instance, state, callback) { |
| 8371 | var fiber = get(instance); |
| 8372 | callback = callback === undefined ? null : callback; |
| 8373 | { |
| 8374 | warnOnInvalidCallback$1(callback, 'replaceState'); |
| 8375 | } |
| 8376 | var expirationTime = computeExpirationForFiber(fiber); |
| 8377 | var update = { |
| 8378 | expirationTime: expirationTime, |
| 8379 | partialState: state, |
| 8380 | callback: callback, |
| 8381 | isReplace: true, |
| 8382 | isForced: false, |
| 8383 | capturedValue: null, |
| 8384 | next: null |
| 8385 | }; |
| 8386 | insertUpdateIntoFiber(fiber, update); |
| 8387 | scheduleWork(fiber, expirationTime); |
| 8388 | }, |
| 8389 | enqueueForceUpdate: function (instance, callback) { |
| 8390 | var fiber = get(instance); |
| 8391 | callback = callback === undefined ? null : callback; |
| 8392 | { |
| 8393 | warnOnInvalidCallback$1(callback, 'forceUpdate'); |
| 8394 | } |
| 8395 | var expirationTime = computeExpirationForFiber(fiber); |
| 8396 | var update = { |
| 8397 | expirationTime: expirationTime, |
no test coverage detected