こうやってるんだけど何がスマートなの・・・?
1const AnyForm: React.VFC<Props> = ({ onSubmit }) => { 2 const { register, handleSubmit, reset } = useForm<{ size: number }>(); 3 4 const submit = async () => { 5 await handleSubmit(onSubmit)(); 6 reset({ 7 size: "" as unkown as number 8 }); 9 }; 10 11 // blah-blah-blah 12}