1// ❌ avoid the following with deep nested default values
2const defaultValues = { object: { deepNest: { file: new File() } } };
3useForm({ defaultValues });
4reset(defaultValues); // share the same reference
5
6// ✅ it's safer with the following, as we only doing shallow clone with defaultValues
7useForm({ deepNest: { file: new File() } });
8reset({ deepNest: { file: new File() } });
9