setState is unnecessary in deps

This commit is contained in:
MinYuan 2020-09-02 07:42:36 +08:00 committed by GitHub
parent 9560255139
commit f0d05c665a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ const useSetState = <T extends object>(
patch => {
set(prevState => Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch));
},
[set]
[]
);
return [state, setState];