const emailInputRef = React.useRef(null); React.useEffect(()=>{ emailInputRef.current.focus(); }, []); <input type="email" name="email" ref={this.emailInputRef} />