MCPcopy
hub / github.com/facebook/react / pushTransition

Function pushTransition

packages/react-reconciler/src/ReactFiberTransition.js:275–299  ·  view source on GitHub ↗
(
  offscreenWorkInProgress: Fiber,
  prevCachePool: SpawnedCachePool | null,
  newTransitions: Array<Transition> | null,
)

Source from the content-addressed store, hash-verified

273}
274
275export function pushTransition(
276 offscreenWorkInProgress: Fiber,
277 prevCachePool: SpawnedCachePool | null,
278 newTransitions: Array<Transition> | null,
279): void {
280 if (prevCachePool === null) {
281 push(resumedCache, resumedCache.current, offscreenWorkInProgress);
282 } else {
283 push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
284 }
285
286 if (enableTransitionTracing) {
287 if (transitionStack.current === null) {
288 push(transitionStack, newTransitions, offscreenWorkInProgress);
289 } else if (newTransitions === null) {
290 push(transitionStack, transitionStack.current, offscreenWorkInProgress);
291 } else {
292 push(
293 transitionStack,
294 transitionStack.current.concat(newTransitions),
295 offscreenWorkInProgress,
296 );
297 }
298 }
299}
300
301export function popTransition(workInProgress: Fiber, current: Fiber | null) {
302 if (current !== null) {

Callers 2

updateOffscreenComponentFunction · 0.90

Calls 1

pushFunction · 0.90

Tested by

no test coverage detected