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

Function useThenable

docs/index.js:7333–7349  ·  view source on GitHub ↗
(thenable)

Source from the content-addressed store, hash-verified

7331 return { lastEffect: null, events: null, stores: null, memoCache: null };
7332};
7333function useThenable(thenable) {
7334 var index = thenableIndexCounter;
7335 thenableIndexCounter += 1;
7336 null === thenableState && (thenableState = []);
7337 thenable = trackUsedThenable(thenableState, thenable, index);
7338 index = currentlyRenderingFiber$1;
7339 null ===
7340 (null === workInProgressHook
7341 ? index.memoizedState
7342 : workInProgressHook.next) &&
7343 ((index = index.alternate),
7344 (ReactSharedInternals.H =
7345 null === index || null === index.memoizedState
7346 ? HooksDispatcherOnMount
7347 : HooksDispatcherOnUpdate));
7348 return thenable;
7349}
7350function use(usable) {
7351 if (null !== usable && "object" === typeof usable) {
7352 if ("function" === typeof usable.then) return useThenable(usable);

Callers 6

useFunction · 0.85
updateActionStateImplFunction · 0.85
index.jsFile · 0.85
updateTransitionFunction · 0.85
rerenderTransitionFunction · 0.85

Calls 2

trackUsedThenableFunction · 0.85
createThenableStateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…