mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
Merge new types from resolveHookState
This commit is contained in:
parent
b7f1939097
commit
d9e2e5e2db
@ -1,10 +1,10 @@
|
||||
import { useState } from 'react';
|
||||
import { resolveHookState, IHookStateSetAction } from '../misc/hookState';
|
||||
import { IHookStateInitAction, IHookStateSetAction, resolveHookState } from '../misc/hookState';
|
||||
import useEffectOnce from '../useEffectOnce';
|
||||
import useIsomorphicLayoutEffect from '../useIsomorphicLayoutEffect';
|
||||
|
||||
export function createGlobalState<S = any>(
|
||||
initialState: S | (() => S)
|
||||
initialState: IHookStateInitAction<S>
|
||||
): () => [S, (state: IHookStateSetAction<S>) => void];
|
||||
export function createGlobalState<S = undefined>(): () => [
|
||||
S,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user