-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Eric is going to mockup the UI in #3 and he's going to use the Axios framework to build out requests to specific data sets, e.g. lists, items, etc that are just dummy data. I should be able to use those datasets fed into Axios to construct API endpoints that Axios can also hit using .get( URI ) to get similar data.
We decided to go with Axios because of the promise structure it uses. Which, instead of trusting the common jQuery Ajax request to handle what happens via the complete or success callbacks, we can let the Ajax request simply finish, while Axios's .then waits until it resolves and passes back data.
The real decision to go with Axios is twofold:
- To move the response to the AJAX request out of the Ajax request's
successfunction, to the.thenfunction of the caller - To use the Promise system going forward
- Axios allows us to make two or more requests to data, yet allow us to handle them both using a single
.then