MCPcopy Index your code
hub / github.com/plotly/dash / startTransition

Function startTransition

dash/deps/react@18.2.0.js:3035–3061  ·  view source on GitHub ↗
(scope, options)

Source from the content-addressed store, hash-verified

3033 }
3034
3035 function startTransition(scope, options) {
3036 var prevTransition = ReactCurrentBatchConfig.transition;
3037 ReactCurrentBatchConfig.transition = {};
3038 var currentTransition = ReactCurrentBatchConfig.transition;
3039
3040 {
3041 ReactCurrentBatchConfig.transition._updatedFibers = new Set();
3042 }
3043
3044 try {
3045 scope();
3046 } finally {
3047 ReactCurrentBatchConfig.transition = prevTransition;
3048
3049 {
3050 if (prevTransition === null && currentTransition._updatedFibers) {
3051 var updatedFibersCount = currentTransition._updatedFibers.size;
3052
3053 if (updatedFibersCount > 10) {
3054 warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
3055 }
3056
3057 currentTransition._updatedFibers.clear();
3058 }
3059 }
3060 }
3061 }
3062
3063 var didWarnAboutMessageChannel = false;
3064 var enqueueTaskImpl = null;

Callers

nothing calls this directly

Calls 2

warnFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…