MCPcopy Index your code
hub / github.com/caseywebdev/react-list / createFiberFromOffscreen

Function createFiberFromOffscreen

docs/index.js:13041–13075  ·  view source on GitHub ↗
(pendingProps, mode, lanes, key)

Source from the content-addressed store, hash-verified

13039 return elements;
13040}
13041function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
13042 pendingProps = createFiberImplClass(22, pendingProps, key, mode);
13043 pendingProps.elementType = REACT_OFFSCREEN_TYPE;
13044 pendingProps.lanes = lanes;
13045 var primaryChildInstance = {
13046 _visibility: 1,
13047 _pendingVisibility: 1,
13048 _pendingMarkers: null,
13049 _retryCache: null,
13050 _transitions: null,
13051 _current: null,
13052 detach: function () {
13053 var fiber = primaryChildInstance._current;
13054 if (null === fiber) throw Error(formatProdErrorMessage(456));
13055 if (0 === (primaryChildInstance._pendingVisibility & 2)) {
13056 var root = enqueueConcurrentRenderForLane(fiber, 2);
13057 null !== root &&
13058 ((primaryChildInstance._pendingVisibility |= 2),
13059 scheduleUpdateOnFiber(root, fiber, 2));
13060 }
13061 },
13062 attach: function () {
13063 var fiber = primaryChildInstance._current;
13064 if (null === fiber) throw Error(formatProdErrorMessage(456));
13065 if (0 !== (primaryChildInstance._pendingVisibility & 2)) {
13066 var root = enqueueConcurrentRenderForLane(fiber, 2);
13067 null !== root &&
13068 ((primaryChildInstance._pendingVisibility &= -3),
13069 scheduleUpdateOnFiber(root, fiber, 2));
13070 }
13071 }
13072 };
13073 pendingProps.stateNode = primaryChildInstance;
13074 return pendingProps;
13075}
13076function createFiberFromText(content, mode, lanes) {
13077 content = createFiberImplClass(6, content, null, mode);
13078 content.lanes = lanes;

Callers 2

Calls 5

createFiberImplClassFunction · 0.85
formatProdErrorMessageFunction · 0.85
scheduleUpdateOnFiberFunction · 0.85
createFiberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…