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

Function mountStateImpl

docs/index.js:7603–7626  ·  view source on GitHub ↗
(initialState)

Source from the content-addressed store, hash-verified

7601 null !== root && scheduleUpdateOnFiber(root, fiber, 2);
7602}
7603function mountStateImpl(initialState) {
7604 var hook = mountWorkInProgressHook();
7605 if ("function" === typeof initialState) {
7606 var initialStateInitializer = initialState;
7607 initialState = initialStateInitializer();
7608 if (shouldDoubleInvokeUserFnsInHooksDEV) {
7609 setIsStrictModeForDevtools(!0);
7610 try {
7611 initialStateInitializer();
7612 } finally {
7613 setIsStrictModeForDevtools(!1);
7614 }
7615 }
7616 }
7617 hook.memoizedState = hook.baseState = initialState;
7618 hook.queue = {
7619 pending: null,
7620 lanes: 0,
7621 dispatch: null,
7622 lastRenderedReducer: basicStateReducer,
7623 lastRenderedState: initialState
7624 };
7625 return hook;
7626}
7627function updateOptimisticImpl(hook, current, passthrough, reducer) {
7628 hook.baseState = passthrough;
7629 return updateReducerImpl(

Callers 4

mountActionStateFunction · 0.85
index.jsFile · 0.85
mountStateFunction · 0.85
mountTransitionFunction · 0.85

Calls 2

mountWorkInProgressHookFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…