79376969

Date: 2025-01-22 08:30:48
Score: 1
Natty:
Report link

Found a solution https://codesandbox.io/p/sandbox/festive-davinci-knwn5r

Had to de-structure the register function of react hook form and pass the ref and props separately

 const { ref, ...inputProps } = register(name);

 <Component inputRef={ref} {...inputProps} {...props} />
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: LoneRanger