Sign in
Log inSign up

Is there a better way to make AJAX requests with React other than using jQuery?

Stephen Ward's photo
Stephen Ward
·Jul 23, 2016

I've been working on persistence with a few React apps and noticed that several online examples just use $.ajax() to make calls to the server–commonly in componentDidMount(). Is there a better way to do this?

Example of tutorials that do this:

React Docs: https://facebook.github.io/react/tips/initial-ajax.html

Amazing React tutorial (shout out to Sahat), within Actions in a FLUX implementation: http://sahatyalkabov.com/create-a-character-voting-app-using-react-nodejs-mongodb-and-socketio/