Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Basics (retired) First Steps in React State and the Virtual DOM

How React is different then Ajax or JS?

So, in the last minutes of video. Jim said about React won't recreate DOM. But if I do an Add button next to input type. When I do button add, it will add the like in this video http://bit.ly/2qWYG3h . So what make React different?

1 Answer

Ajax is used to refresh a web page without having to reload it : it sends a request to the server, but typically the response is processed by the javascript that displays dynamically a new element on the browser without having to reload the entire page.

React is a javascript library that dynamically update the page with interface components. The components are calculated either by javascript interactions or by an Ajax request that go through the server. So ReactJS can also use Ajax requests to update the page.