Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets Tatiana #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Sockets Tatiana #42

wants to merge 4 commits into from

Conversation

tatsqui
Copy link

@tatsqui tatsqui commented Jun 3, 2019

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? The page can load completely and other bits of code can be dynamically loaded to the page when wanted/needed/requested without having to wait for that request to finish.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? Loading the trips list - the button is loaded to the page for the client to click on it when they are ready to. So the SPA doesn't have to wait for the list to be loaded in order for the rest of the page to be loaded.
What kind of errors might the API give you? How did you choose to handle them? You could get a bad request error if you don't submit a name/email for reservations. I chose to notify the user of those messages in the case that they do not enter the information. I plan on adding this notification to the form fields themselves when I get a chance to after interviews are done this week.
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. I don't think this would be necessary. Having the trips sorted by ID I think would be mostly easy for a human to find the id, but otherwise an ID can be collected from the object when needed using our fancy tools like jquery.

@CheezItMan
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene More commits would be good, it's also a good idea to describe the functionality you've added, not a wave number for a commit message.
Comprehension questions Check, asynchronous code is code that may not run in a particular sequence. You cannot predict when it will run or finish, like an API callback, or an event handler.
Functionality
Click a button to load and view a list of trips Check
Clicking the "load" button twice does not cause each trip to display twice Check
Click a trip to load and view trip details Check
Clicking a different trip loads different details Check
Open network tab, then fill out a form to reserve a spot Check
Submitting the form only sends one POST request Check
Errors are reported to the user Showing trip details with no network connection does not display an error message. Submitting a reservation for a trip does not display error messages for network errors. It does display validation errors for the form submission. See my inline notes
Site is clearly laid out and easy to navigate Simple, but works
Under the Hood
Callback functions are not nested more than 2 levels deep Check
Callback functions are given descriptive names Good names
Code is generally well-organized and easy to read Check, I did notice some complaints from Eslint.
All API calls have both success and error callbacks defined Check
HTML is semantic Check
CSS is DRY, uses CSS Grid, Flexbox, and/or Bootstrap Good use of CSS Grid
Overall Nice work, you hit all the learning goals of the project. Let me know if you have any questions on my feedback.

index.js Outdated
})
.catch((error) => {
console.log(error)
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.

This should read: if (error.response && error.response.data && error.response.data.errrors) {

That way for network errors it doesn't crash.

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