English
getValues
An optimized helper for reading form values.
Type
type getValues = (payload?: string | string[]) => Object
Props
payload
string | string[]
- A field name or an array of field names to read from the form values.
getValues('test') getValues(['test1', 'test2'])
Example
register('root.test1')
register('root.test2')
getValues('root') // { test1: '', test2: ''}