I thought my React form was broken… until I understood e.preventDefault()
I was building a simple React form.
Nothing fancy.
Just this:
<form onSubmit={onSubmit}>
<input value={userName} name="userName"/>
<button type="submit">Add User</button>
</form>
I typed a n
kumsomi.hashnode.dev4 min read