Answer the question
In order to leave comments, you need to log in
Passing data AJAX REACT?
Good evening!
After jquery, I started learning React.
With jquery, it was easy enough to write an ajax request that submits the data from the form:
$.ajax({
url: *.php,
method: "post",
data: data,
error:function (message) {
console.log('err');
},
success:function (data) {
console.log('ok');
}
}),
Answer the question
In order to leave comments, you need to log in
https://github.com/axios/axios/blob/master/README.md Here's the literature for you
TL;DR On the modern web, this is done much more elegantly than in jQuery
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question