79738311

Date: 2025-08-18 05:48:05
Score: 1
Natty:
Report link

The keyName prop has been dropped in a major version release.

a screenshot from the react-hook-form doc

An alternative is by setting a unique field key yourself in your form data aside id.

{ dbId: 'abc123', ...otherFields, id: 'generatedId' }

Then before submitting, you can structure it any how you like.

const submitData = fields.map(({ dbId, ...rest }) => ({ id: dbId, ...rest }));
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: UncleBigBay