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

Function mountOptimistic

docs/index.js:25079–25098  ·  view source on GitHub ↗
(passthrough)

Source from the content-addressed store, hash-verified

25077 return [initialState.memoizedState, dispatch];
25078 }
25079 function mountOptimistic(passthrough) {
25080 var hook = mountWorkInProgressHook();
25081 hook.memoizedState = hook.baseState = passthrough;
25082 var queue = {
25083 pending: null,
25084 lanes: 0,
25085 dispatch: null,
25086 lastRenderedReducer: null,
25087 lastRenderedState: null
25088 };
25089 hook.queue = queue;
25090 hook = dispatchOptimisticSetState.bind(
25091 null,
25092 currentlyRenderingFiber$1,
25093 !0,
25094 queue
25095 );
25096 queue.dispatch = hook;
25097 return [passthrough, hook];
25098 }
25099 function updateOptimistic(passthrough, reducer) {
25100 var hook = updateWorkInProgressHook();
25101 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);

Callers 1

index.jsFile · 0.85

Calls 1

mountWorkInProgressHookFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…