diff options
| author | Haishan <[email protected]> | 2020-11-13 23:03:41 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-11-13 23:03:41 +0800 |
| commit | 3bbca8017b5de78ce982efd6d2889262bff2d7d1 (patch) | |
| tree | 19550d8ef68bca2b36a92b1c6e677bd4e6418a55 /src/hooks/basic.ts | |
| parent | 837cca81317fe7158bc1be2d07949e64d07a0293 (diff) | |
chore: remove husky and lint-staged
Diffstat (limited to 'src/hooks/basic.ts')
| -rw-r--r-- | src/hooks/basic.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hooks/basic.ts b/src/hooks/basic.ts index c8eddbc..587d92d 100644 --- a/src/hooks/basic.ts +++ b/src/hooks/basic.ts @@ -4,6 +4,6 @@ const { useState, useCallback } = React; export function useToggle(initialValue = false) { const [isOn, setState] = useState(initialValue); - const toggle = useCallback(() => setState(x => !x), []); + const toggle = useCallback(() => setState((x) => !x), []); return [isOn, toggle]; } |
