If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).
Example below explains implications for different implementations.
| import { ReactNode, useRef } from 'react' | |
| import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react' | |
| import { useForm, UseFormRegisterReturn } from 'react-hook-form' | |
| import { FiFile } from 'react-icons/fi' | |
| type FileUploadProps = { | |
| register: UseFormRegisterReturn | |
| accept?: string | |
| multiple?: boolean | |
| children?: ReactNode |
<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>
<general_guidelines>