UNPKG

fielder

Version:

A field-first form library for React and React Native

28 lines (16 loc) 520 B
# useFormContext _Retrieves form state exposed via context._ ```tsx import { useFormContext } from 'fielder'; ``` ## Example Usage ```tsx const formState = useFormContext(); return <button disabled={!formState.isValid}>Submit</button>; ``` ## Response The state of the form [(FormState)](/api/useform#formstate) along with accessors and mutators. Type; `FormState` > See [useForm documentation](/api/useform) for more information about _FormState_ ## Arguments `useForm` doesn't currently take any arguments.