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

Ports - Jessica #39

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

Ports - Jessica #39

wants to merge 19 commits into from

Conversation

jessicacaley
Copy link

@jessicacaley jessicacaley commented Jun 24, 2019

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What is the flow of data from input on the form to being a new card on the board? As text is entered in the NewCardForm component, it's saved into the state of the form. When the form is submitted, the card is posted to the API and, if successful, a callback function to Board is called (and state is cleared in the form). In Board, the new ID is calculated and the new card with its ID is added to the beginning of the cards state in Board. With the state change, the page is rerendered with the new note.
What function did you use to make the GET request from the API to get the list of cards? Why use that function? componentDidMount, because we don't want to make the API call until the page is ready to receive the package.
How do snapshot tests differ from unit tests? We're simply comparing a previous layout of a page again the current one. It's testing for change, not for "function." It's a helpful way to test front-end view in a way that unit tests can't reliably do.
What purpose does Enzyme serve in testing a React app? Enzyme allows up to test a shallow copy of the page instead of all the nested components.

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.

1 participant