diff --git a/hooks/src/index.d.ts b/hooks/src/index.d.ts index b6adbac891..c9f6788d38 100644 --- a/hooks/src/index.d.ts +++ b/hooks/src/index.d.ts @@ -9,6 +9,11 @@ export type StateUpdater = (value: S | ((prevState: S) => S)) => void; */ export function useState(initialState: S | (() => S)): [S, StateUpdater]; +export function useState(): [ + S | undefined, + StateUpdater +]; + export type Reducer = (prevState: S, action: A) => S; /** * An alternative to `useState`.