import React from 'react'; import { useForm } from 'react-hook-form'; const Watch: React.FC = () => { const { register, handleSubmit, watch } = useForm<{ testSingle: string; test: string[]; testObject: { firstName: string; lastName: string; }; toggle: string; }>(); const onSubmit = () => {}; const test = watch('test'); const testObject = watch('testObject'); const testSingle = watch('testSingle'); const testArray = watch(['test.0', 'test.1']); const toggle = watch('toggle'); const watchAll = watch(); return (
); }; export default Watch;