react-define-form
Version:
React define form offers alternative typescript bindings for [react-final-form](https://github.com/final-form/react-final-form). It requires you to "define" a form type, specifying the type of the form data.
10 lines (9 loc) • 516 B
TypeScript
import { FormState, FormSubscription } from 'define-form';
import RenderableProps from './RenderableProps';
import { SubsetFormApi } from './FormProps';
export interface FormSpyRenderProps<FormData, ErrorValue> extends FormState<FormData, ErrorValue>, SubsetFormApi<FormData> {
}
export default interface FormSpyProps<FormData, ErrorValue> extends RenderableProps<FormSpyRenderProps<FormData, ErrorValue>> {
onChange?: (formState: FormState<FormData, ErrorValue>) => void;
subscription?: FormSubscription;
}