Skip to content

Commit e47fa2a

Browse files
committed
fix initialState bug
1 parent d882176 commit e47fa2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type UseAsyncStateResult<R> = {
6868
const useAsyncState = <R extends {}>(
6969
options: UseAsyncOptionsNormalized<R>
7070
): UseAsyncStateResult<R> => {
71-
const [value, setValue] = useState<AsyncState<R>>(InitialAsyncState);
71+
const [value, setValue] = useState<AsyncState<R>>(options.initialState);
7272
return {
7373
value,
7474
set: setValue,

0 commit comments

Comments
 (0)