MCPcopy Create free account
hub / github.com/reactjs/react-rails / startTransition

Function startTransition

lib/assets/react-source/development/react.js:19217–19233  ·  view source on GitHub ↗
(setPending, config, callback)

Source from the content-addressed store, hash-verified

19215 }
19216
19217 function startTransition(setPending, config, callback) {
19218 var priorityLevel = getCurrentPriorityLevel();
19219 runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
19220 setPending(true);
19221 });
19222 runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
19223 var previousConfig = ReactCurrentBatchConfig$1.suspense;
19224 ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
19225
19226 try {
19227 setPending(false);
19228 callback();
19229 } finally {
19230 ReactCurrentBatchConfig$1.suspense = previousConfig;
19231 }
19232 });
19233 }
19234
19235 function mountTransition(config) {
19236 var _mountState2 = mountState(false),

Callers

nothing calls this directly

Calls 2

getCurrentPriorityLevelFunction · 0.85
runWithPriority$1Function · 0.85

Tested by

no test coverage detected