We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d882176 commit e47fa2aCopy full SHA for e47fa2a
src/index.ts
@@ -68,7 +68,7 @@ type UseAsyncStateResult<R> = {
68
const useAsyncState = <R extends {}>(
69
options: UseAsyncOptionsNormalized<R>
70
): UseAsyncStateResult<R> => {
71
- const [value, setValue] = useState<AsyncState<R>>(InitialAsyncState);
+ const [value, setValue] = useState<AsyncState<R>>(options.initialState);
72
return {
73
value,
74
set: setValue,
0 commit comments