Skip to content

Conversation

@kseastman
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? It does not execute linearly, with each line executing and then executing the next piece and the next. Asynchronous code waits for events that trigger the code to execute.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? Trip details and the form to reserve a trip executed asynchronously based on a click on the list item associated with the trip. This meant that the click handler needed to be properly situated within the environment in order to refer to the right set of instructions.
What kind of errors might the API give you? How did you choose to handle them? I handled them in the catch portion of my axios call with a console log message and a message displayed to the user in the status portion of my header.
Do you have any recommendations on how we could improve this project for the next cohort?
Nope.

@kariabancroft
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Ok - but could be more frequent
Comprehension questions Yes
Functionality
Click a button to list trips Yes
Click a trip to see trip details Yes
Fill out a form to reserve a spot Yes
Errors are reported to the user Yes
Styling Yes
Under the Hood
Trip data is retrieved using from the API Yes
JavaScript is well-organized and easy to read Not quite - see inline comment about nested reservation handling. Overall though, you're using appropriate indentation, semi-colons and JS syntax.
HTML is semantic Yes
Overall Good job hitting the major learning goals of this assignment.

const reserveTrip = $('#reserve-trip');
reserveTrip.empty();

let trip_id = this.id;

Choose a reason for hiding this comment

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

Watch out for old Ruby naming conventions!

`
);

const createReservation = (event) => {

Choose a reason for hiding this comment

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

By having this function directly inside the function that handles loading a single trip, this greatly reduces the readability, especially in trying to find the catch. Consider moving this out and accessing the trip's ID in a different way - preferrably via the DOM.

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