MCPcopy Create free account
hub / github.com/microsoft/SandDance / mountDeferredValue

Function mountDeferredValue

docs/external/js/react-dom.development.js:15603–15619  ·  view source on GitHub ↗
(value, config)

Source from the content-addressed store, hash-verified

15601 }
15602
15603 function mountDeferredValue(value, config) {
15604 var _mountState = mountState(value),
15605 prevValue = _mountState[0],
15606 setValue = _mountState[1];
15607
15608 mountEffect(function () {
15609 var previousConfig = ReactCurrentBatchConfig$1.suspense;
15610 ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
15611
15612 try {
15613 setValue(value);
15614 } finally {
15615 ReactCurrentBatchConfig$1.suspense = previousConfig;
15616 }
15617 }, [value, config]);
15618 return prevValue;
15619 }
15620
15621 function updateDeferredValue(value, config) {
15622 var _updateState = updateState(),

Callers 1

Calls 2

mountStateFunction · 0.85
mountEffectFunction · 0.85

Tested by

no test coverage detected