(initialState)
| 15350 | } |
| 15351 | |
| 15352 | function mountState(initialState) { |
| 15353 | var hook = mountWorkInProgressHook(); |
| 15354 | |
| 15355 | if (typeof initialState === 'function') { |
| 15356 | // $FlowFixMe: Flow doesn't like mixed types |
| 15357 | initialState = initialState(); |
| 15358 | } |
| 15359 | |
| 15360 | hook.memoizedState = hook.baseState = initialState; |
| 15361 | var queue = hook.queue = { |
| 15362 | pending: null, |
| 15363 | dispatch: null, |
| 15364 | lastRenderedReducer: basicStateReducer, |
| 15365 | lastRenderedState: initialState |
| 15366 | }; |
| 15367 | var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue); |
| 15368 | return [hook.memoizedState, dispatch]; |
| 15369 | } |
| 15370 | |
| 15371 | function updateState(initialState) { |
| 15372 | return updateReducer(basicStateReducer); |
no test coverage detected