Skip to content

AJAX Documentation

Monica Bui edited this page Apr 13, 2021 · 4 revisions

We make AJAX calls to our backend for any CRUD operations that are needed to support this application. We use the Axios library (fetch wrapper) to make the API calls to return data from the backend that we can manipulate in the frontend and send back to save to our database.

The ApiUtils.js file is the main file that holds all our AJAX calls with some other calls sprinkled throughout our application if they are only used for one specific use case. The functions in this file is called throughout our app so that we can reuse these calls and save them all in one centralized location.

From top to bottom in the file,

In MyFeed.js,

In PublicFeed.js

In CreatePostPage.js

In EditPostPage.js

In PostComponent.js

In EditProfileModal.js

In LoginPage.js

In SignupPage.js