mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 03:41:11 +01:00
Schema filtering and a bunch of fixes
This commit is contained in:
@@ -3,5 +3,5 @@ import { useCallback, useState } from 'react';
|
||||
export function useToggle(initialValue = false) {
|
||||
const [value, setValue] = useState<boolean>(initialValue);
|
||||
const toggle = useCallback(() => setValue((v) => !v), []);
|
||||
return [value, toggle] as const;
|
||||
return [value, toggle, setValue] as const;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user