import { useForm } from 'react-hook-form';const Example = () => {const { register, handleSubmit } = useForm({defaultValues: {name: 'react-hook-form',},});return (<formonSubmit={handleSubmit((data) => console.log(data))}className="space-y-2"><TextInput {...register('name')} /><div><buttontype="submit"className="px-3 py-1 bg-blue-600 text-white rounded">Submit</button></div></form>);};render(<Example />);