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

Function popProvider

packages/react-reconciler/src/ReactFiberNewContext.js:124–147  ·  view source on GitHub ↗
(
  context: ReactContext<any>,
  providerFiber: Fiber,
)

Source from the content-addressed store, hash-verified

122}
123
124export function popProvider(
125 context: ReactContext<any>,
126 providerFiber: Fiber,
127): void {
128 const currentValue = valueCursor.current;
129
130 if (isPrimaryRenderer) {
131 context._currentValue = currentValue;
132 if (__DEV__) {
133 const currentRenderer = rendererCursorDEV.current;
134 pop(rendererCursorDEV, providerFiber);
135 context._currentRenderer = currentRenderer;
136 }
137 } else {
138 context._currentValue2 = currentValue;
139 if (__DEV__) {
140 const currentRenderer2 = renderer2CursorDEV.current;
141 pop(renderer2CursorDEV, providerFiber);
142 context._currentRenderer2 = currentRenderer2;
143 }
144 }
145
146 pop(valueCursor, providerFiber);
147}
148
149export function scheduleContextWorkOnParentPath(
150 parent: Fiber | null,

Callers 4

unwindWorkFunction · 0.90
unwindInterruptedWorkFunction · 0.90
popCacheProviderFunction · 0.90
completeWorkFunction · 0.90

Calls 1

popFunction · 0.90

Tested by

no test coverage detected