mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
fix: add initialState to deps
This commit is contained in:
parent
0770d04c68
commit
b394f3d723
@ -32,7 +32,7 @@ const useMethods = <M, T>(createMethods: CreateMethods<M, T>, initialState: T):
|
||||
acc[type] = (...payload) => dispatch({ type, payload });
|
||||
return acc;
|
||||
}, {} as WrappedMethods<M>);
|
||||
}, [createMethods]);
|
||||
}, [createMethods, initialState]);
|
||||
|
||||
return [state, wrappedMethods];
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user