Repository: react-hook-form/react-hook-form
File: src/useFieldArray.ts (TypeScript)

Code before:
const mapIds = <
  TFieldArrayValues extends FieldValues = FieldValues,
  TKeyName extends string = 'id'
>(
  values: Partial<TFieldArrayValues>[] = [],
  keyName: TKeyName,
): Partial<ArrayField<TFieldArrayValues, TKeyName>>[] => {
  let reservedKeyUsed = false;
  const result = values.map((value: Partial<TFieldArrayValues>) => {
    if (keyName in value) {
      reservedKeyUsed = true;
    }
    return {
      [keyName]: generateId(),
      ...value,
    };
  });

  if (process.env.NODE_ENV !== 'production' && reservedKeyUsed) {
    console.warn(
      `📋 useFieldArray fieldValues contain the keyName \`${keyName}\` which is reserved for use by useFieldArray. https://react-hook-form.com/api#useFieldArray`,
    );
  }

  return result;
};

export const useFieldArray = <
  TFieldArrayValues extends FieldValues = FieldValues,
  TKeyName extends string = 'id',
  TControl extends Control = Control
>({
  control,
  name,
  keyName = 'id' as TKeyName,
}: UseFieldArrayOptions<TKeyName, TControl>): UseFieldArrayMethods<
  TFieldArrayValues,
  TKeyName
> => {
  const methods = useFormContext();

  if (process.env.NODE_ENV !== 'production') {
    if (!control && !methods) {
      throw new Error(
        '📋 useFieldArray is missing `control` prop. https://react-hook-form.com/api#useFieldArray',
      );
    }
  }

  const focusIndexRef = React.useRef(-1);
  const {

Review comment (suggestion):
```suggestion
): Partial<ArrayField<TFieldArrayValues, TKeyName>>[] => {
  if (process.env.NODE_ENV !== 'production') {
    for (const value of values) {
      if (keyName in value) {
        console.warn(
          `📋 useFieldArray fieldValues contain the keyName \`${keyName}\` which is reserved for use by useFieldArray. https://react-hook-form.com/api#useFieldArray`,
        );

        break;
      }
    }
  }

  return values.map((value: Partial<TFieldArrayValues>) => ({
    [keyName]: generateId(),
    ...value,
  }));
};
```

Thank you for the quick PR! Love it! Just a small suggestion above.

Code after:
const mapIds = <
  TFieldArrayValues extends FieldValues = FieldValues,
  TKeyName extends string = 'id'
>(
  values: Partial<TFieldArrayValues>[] = [],
  keyName: TKeyName,
): Partial<ArrayField<TFieldArrayValues, TKeyName>>[] => {
  if (process.env.NODE_ENV !== 'production') {
    for (const value of values) {
      if (keyName in value) {
        console.warn(
          `📋 useFieldArray fieldValues contain the keyName \`${keyName}\` which is reserved for use by useFieldArray. https://react-hook-form.com/api#useFieldArray`,
        );

        break;
      }
    }
  }

  return values.map((value: Partial<TFieldArrayValues>) => ({
    [keyName]: generateId(),
    ...value,
  }));
};

export const useFieldArray = <
  TFieldArrayValues extends FieldValues = FieldValues,
  TKeyName extends string = 'id',
  TControl extends Control = Control
>({
  control,
  name,
  keyName = 'id' as TKeyName,
}: UseFieldArrayOptions<TKeyName, TControl>): UseFieldArrayMethods<
  TFieldArrayValues,
  TKeyName
> => {
  const methods = useFormContext();

  if (process.env.NODE_ENV !== 'production') {
    if (!control && !methods) {
      throw new Error(
        '📋 useFieldArray is missing `control` prop. https://react-hook-form.com/api#useFieldArray',
      );
    }
  }

  const focusIndexRef = React.useRef(-1);
  const {
    updateWatchedValue,
    resetFieldArrayFunctionRef,