react-final-form-arrays
react-final-form-arrays copied to clipboard
Should the type of FieldArrayRenderProps['fields']['length'] be non-optional?
Currently FieldArrayRenderProps.fields gets length from FieldState where it is optional: length?: number. From the code, it looks like it is expected to always be a number. With it being optional you end up needing to do things like fields.length && fields.length > 1 if you want to see if there's more than one field. If you agree, I'd be happy to submit a PR