UNPKG
@clive-cudi/geist-ui
Version:
latest (1.0.0)
1.0.0
Modern and minimalist React UI library.
geist-ui.dev
clive-cudi/geist-ui
@clive-cudi/geist-ui
/
dist
/
use-current-state
/
use-current-state.d.ts
5 lines
(4 loc)
•
285 B
TypeScript
View Raw
1
2
3
4
5
import
{
Dispatch
,
MutableRefObject
,
SetStateAction
}
from
'react'
;
export
declare
type
CurrentStateType
<S> = [S,
Dispatch
<
SetStateAction
<S>>,
MutableRefObject
<S>];
declare
const
useCurrentState
: <S>
(
initialState
: S | (() => S)
) =>
CurrentStateType
<S>;
export
default
useCurrentState;