Answer the question
In order to leave comments, you need to log in
How to handle onSubmit event of form element in React using hooks?
The question has actually been asked. There are examples on the Internet of how to implement this using typescript, but I did not find it in simple Java.
const handleSubmit = КАК ЭТО ОБРАБОТАТЬ?
};
return (
<form onSubmit={handleSubmit}>
<div>
<label htmlFor='email'>Email</label>
<input type='email' id='email' value={email} onChange={(e) => setEmail(e.target.value)} />
</div>
<div>
<label htmlFor='password'>Password</label>
<input type='password' id='password' value={password} onChange={(e) => setPassword(e.target.value)} />
</div>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question