UNPKG
@vue-widget/hooks
Version:
latest (0.3.3)
0.3.3
0.3.2
0.3.1
0.3.0
0.2.1
0.1.0
0.0.1
hooks from react to vue
github.com/qianyuhouse/hooks
@vue-widget/hooks
/
lib
/
useState
/
index.d.ts
4 lines
(3 loc)
•
202 B
TypeScript
View Raw
1
2
3
4
import
type
{
Ref
}
from
"vue"
;
export
type
SetState
<T> =
(
val
: T | ((prevState: T) => T)
) =>
void
;
export
declare
function
useState<T, R =
Ref
<T>>(
defaultStateValue
?: T | (
() =>
T)): [R,
SetState
<T>];