Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function useGlobalForm(
options: FormOptions,
watch: Partial = {}
): [FormShape, Form | undefined] {
const [values, form] = useForm(options, watch)
const GlobalForm = useMemo(() => {
if (!form) return
return new GlobalFormPlugin(form)
}, [form])
usePlugins(GlobalForm)
return [values, form]
}