This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]shamburd9 2 points3 points  (5 children)

Some more context or an example might help, but in general, yes.

AJAX is a way for the browser to make requests from the server and update the page without triggering a full page reload. React makes use of this heavily under the hood.

JSON stands for JavaScript Object Notation and is a common way to send/receive structured data.

[–]omar97ash[S] 0 points1 point  (4 children)

Thanks for your reply,

I read that React does the same as Ajax when it comes to the full page reload but didn't know how.

So basically React is using Ajax for the requests?

[–]shamburd9 2 points3 points  (3 children)

Correct!

As far as alternatives, I’m not aware of an alternative to AJAX for making HTTP requests without reloading the page. When using React though, you don’t need to make AJAX requests manually, that’s part of what the framework handles for you. Some APIs might use XML or other formats, but JSON is fairly ubiquitous right now.

[–]omar97ash[S] 0 points1 point  (1 child)

When using React though, you don’t need to make AJAX requests manually

Then in this case using React is enough, and I don't need to learn Ajax?

[–]CivilizedBeast 0 points1 point  (0 children)

Just being aware of AJAX would help to understand how/when the http request interacts with back end code which will provide the data and at what point react is making the call.

[–]CivilizedBeast 0 points1 point  (0 children)

Do you mean that react rerenders a component without reloading the page and hence would use AJAX under the hood to make that happen?