@tinacms/toolkit
Version:
Tina is a lightweight but powerful toolkit for creating a site editing ui with javascript components. Tina surfaces superpowers for dev’s to create, expand on and customize a simple yet intuitive ui for editing content.
20 lines (16 loc) • 673 B
TypeScript
/**
*/
import { FormOptions, Form } from '../forms';
export interface WatchableFormValue {
values: any;
label: FormOptions<any>['label'];
fields: FormOptions<any>['fields'];
}
/**
* @deprecated See https://github.com/tinacms/rfcs/blob/master/0006-form-hook-conventions.md
*/
export declare function useLocalForm<FormShape = any>(options: FormOptions<any>, watch?: Partial<WatchableFormValue>): [FormShape, Form];
/**
* A hook that creates a form and updates it's watched properties.
*/
export declare function useForm<FormShape = any>({ loadInitialValues, ...options }: FormOptions<any>, watch?: Partial<WatchableFormValue>): [FormShape, Form, boolean];