MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / batchedUpdatesWithControlledComponents

Function batchedUpdatesWithControlledComponents

bundle.js:5866–5873  ·  view source on GitHub ↗
(fn,bookkeeping)

Source from the content-addressed store, hash-verified

5864return fiberBatchedUpdates(fn,bookkeeping);}function batchedUpdates(fn,bookkeeping){// We first perform work with the stack batching strategy, by passing our
5865// indirection to it.
5866return stackBatchedUpdates(performFiberBatchedUpdates,fn,bookkeeping);}var isNestingBatched=false;function batchedUpdatesWithControlledComponents(fn,bookkeeping){if(isNestingBatched){// If we are currently inside another batch, we need to wait until it
5867// fully completes before restoring state. Therefore, we add the target to
5868// a queue of work.
5869return batchedUpdates(fn,bookkeeping);}isNestingBatched=true;try{return batchedUpdates(fn,bookkeeping);}finally{// Here we wait until all updates have propagated, which is important
5870// when using controlled components within layers:
5871// https://github.com/facebook/react/issues/1698
5872// Then we restore state of any controlled component.
5873isNestingBatched=false;ReactControlledComponent_1.restoreStateIfNeeded();}}var ReactGenericBatchingInjection={injectStackBatchedUpdates:function injectStackBatchedUpdates(_batchedUpdates){stackBatchedUpdates=_batchedUpdates;},injectFiberBatchedUpdates:function injectFiberBatchedUpdates(_batchedUpdates){fiberBatchedUpdates=_batchedUpdates;}};var ReactGenericBatching={batchedUpdates:batchedUpdatesWithControlledComponents,injection:ReactGenericBatchingInjection};var ReactGenericBatching_1=ReactGenericBatching;var TEXT_NODE$1=HTMLNodeType_1.TEXT_NODE;/**
5874 * Gets the target node from a native browser event by accounting for
5875 * inconsistencies in browser DOM APIs.
5876 *

Callers

nothing calls this directly

Calls 1

batchedUpdatesFunction · 0.85

Tested by

no test coverage detected