Skip to content

Conversation

@danimetz
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? Asynchronous allows multiple things to happen at the same time. You can start an action and everything will continue to run and once it's done the program will get access to the result.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? This is a little unclear for me but I think the get and post requests are running asynchronously. Because while they are loading a reporting a status and then they finally load the request once its finished getting the json from the API.
What kind of errors might the API give you? How did you choose to handle them? The .catch((error) will update the Report Status to alert the user of the issue that was encountered
Suppose you needed to routinely find a specific Trip in the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not. It doesn't matter, the order can changed and we can still find the trip by id when we click on it.

@CheezItMan
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene
Comprehension questions Check, you are correct that axios' get and post requests are asynchronous. Keeping trips in order could under other circumstances make it faster, O(log n) vs O(n) to find a particular trip.
Functionality
Click a button to load and view a list of trips Check
Click a trip to load and view trip details Check
Fill out a form to reserve a spot Check
Errors are reported to the user Check, but you have a small bug in reporting errors on the registration form. See my notes.
CSS is DRY and attractive, uses CSS Grid, flexbox, and/or Bootstrap Looks great with a good responsive design.
Under the Hood
Trip data is retrieved using from the API Check
JavaScript is well-organized and easy to read Well done
HTML is semantic Pretty good semantic HTML, but some of your indentation is off, minor issue.
Overall Great work, you hit all the learning goals for the project. Well done. Do see my note on the error reporting for the form.

// Make sure the server actually sent us errors. If
// there's a different problem, like a typo in the URL
// or a network error, the response won't be filled in.
if (error.response.data && error.response.data.errors) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're handling validation errors here, but not network errors, what if the API is unreachable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants