Form context
Add context support to use-form with createFormContext
Source
Docs
Package
Usage
createFormContext
function creates context provider and hook to get form object from context:
Store context in separate file
Usually it is a good idea to store form context in separate file to avoid dependencies cycle:
Then you can import context variables from anywhere: