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

Victoria Garcia - Ampers - Inspiration Board #42

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

Conversation

Lasiorhine
Copy link

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain the steps in creating a new Card from the form. The user fills out the form, and as they do, the onFieldChange function sets the state of the function based on that input. OnFormSubmit then handles the submission, which involves using the callback function AddCard to submit the new card's info to the API. AddCard also reloads the page, so that ComponentDidMount runs again in Board, pulling down the updated list of cards from the API, and a new card is created in Board's render function. (This seems really baroque, doesn't it?)
How did you learn how to use the API? I used Postman and the raw URLs to get the lay of the land, I made heavy use of the alligator.io article linked from our textbook, and then I just sort of poked at it until it did what I wanted.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? ComponentDidMount -- it pulls everything down when the component mounts, so yay.
Explain the purpose of a Snapshot test. It compares the DOM with a previously-recorded snapshot, which eliminates a great deal of the potential friability of the tests.
What purpose does Enzyme serve in testing a React app? It helps us render react components in the test-specific context, and gives tools for identifying props, dealing the child elements, making queries, simulating events, etc.

// Assert
expect(mockAddCardCallback).toHaveBeenCalled();

});
Copy link

Choose a reason for hiding this comment

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

You have a pretty significant typo here and you need another });, or your tests break and won't run

@tildeee
Copy link

tildeee commented Jul 2, 2018

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
Card Component renders the data provided as props you pass in props and then store them in state. You probably don't need to store state in Card.
Board Component takes a URL and renders the list of Cards and passes in callback functions Our code organization implies that it'll be neater if the Board contains the callback function for deleting a card, and passes that callback function into the Card component. Instead, you have the callback function for deleting a card inside of the Card itself
NewCardform Component is a controlled form and uses a callback function to return entered data to the parent component x
API
GET request made in componentDidMount x
DELETE request made in callback function
POST request made in callback function passed to NewCardForm component. x
Snapshot testing x
Styling some
Overall

Your page reloads on submitting the form, which doesn’t adhere to our expectations of a Single Page App. This is because you handle events through a form’s onSubmit call. You should instead handle this event with the onClick event

A large piece of feedback I have for this project is around how you handled deleting cards, which I described above

Otherwise, good job!

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