Estoy tratando de hacer una alerta cuando alguien está ingresando su nombre. Pero siempre dice indefinido... ¿Cómo puedo arreglar eso?
const handleSubmit = async(event) => { event.preventDefault(); const name = event.target.name.value; alert(`Hi ${name}!`); }; <form onSubmit={handleSubmit}> <input type="text" name="textinput" minlenght="1" placeholder="Wassup?"></input> <button type="submit">send</button> </form>