Skip to content

Typescript: useFieldArray second argument (config) should be optional #104

@Yankovsky

Description

@Yankovsky
export function useFieldArray<
  FieldValue = any,
  T extends HTMLElement = HTMLElement
>(
  name: string,
  config: UseFieldArrayConfig<FieldValue>
): FieldArrayRenderProps<FieldValue, T>

config should be optional, right? Just like in react-final-form. Readme clearly states

The useFieldArray hook takes two parameters, the first is the name of the field, and the second is an optional object that looks just like FieldArrayProps, except without the name. It returns an object just like FieldArrayRenderProps.

I'll make a pr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions