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 useGlobalJsonForm(
jsonNode: JsonNode | null,
formOptions: Partial> = {}
) {
const [values, form] = useJsonForm(jsonNode, formOptions)
usePlugins(
React.useMemo(() => {
if (form) {
return new GlobalFormPlugin(form, null)
}
}, [form])
)
return [values, form]
}
export function useLocalJsonForm(
jsonNode: JsonNode | null,
formOptions: Partial> = {}
) {
const [values, form] = useJsonForm(jsonNode, formOptions)
usePlugins(form as any)
return [values, form]
}