Answer the question
In order to leave comments, you need to log in
How to preventDefault in React-bootstrap form? or get rid of full page reload on submit?
You need form validation, but you don't need a full page reload. How to get rid of it?
e.preventDefault in react function doesn't work. You can remove the form and just send the fields with the button, but then the validation disappears, but it is needed.
<form>//если ставим сюда onSubmit, валидация происходит, но страница перегружается
<ButtonInput type="submit" onClick={()=>this.handleSubmit()} />
//Если из кнопки убираем type="submit" валидация формы не идет
</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