import React, { useEffect, useRef } from 'react'; export default function TextInput({ type = 'text', name, value, className, autoComplete, required, isFocused, handleChange, }) { const input = useRef(); useEffect(() => { if (isFocused) { input.current.focus(); } }, []); return (