UNPKG

fielder

Version:

A field-first form library for React and React Native

13 lines (12 loc) 523 B
import { SetStateAction, FieldState, FormSchemaType } from '../types'; import { ActionHandler } from './util'; /** Set state of a field (without triggering validation). */ export declare type SetFieldStateAction = { type: 'SET_FIELD_STATE'; config: SetFieldStateArgs<any, any>; }; export declare type SetFieldStateArgs<T extends FormSchemaType, K extends keyof T> = { name: K; state: SetStateAction<FieldState<T, K>>; }; export declare const doSetFieldState: ActionHandler<SetFieldStateAction>;