Skip to content

Inspiration Board - Divya#38

Open
Naltrexone wants to merge 25 commits intoAda-C10:masterfrom
Naltrexone:master
Open

Inspiration Board - Divya#38
Naltrexone wants to merge 25 commits intoAda-C10:masterfrom
Naltrexone:master

Conversation

@Naltrexone
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. Changing the inputs updates the state in the form. Submitting the form calls a callback method in the Board and subsequently resets the state of the form. This callback method takes the input from the form and creates a new card, writing it to the API and displaying it in the Board without making another API call.
How did you learn how to use the API? Through trial-and-error with Postman.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? componentDidMount. The point of using this function is to make sure the component is rendered before attempting to load the API data. This way rendering the component does not depend on the API call so if it takes a long time to retrieve the data it doesn't look like the entire component is broken.
Explain the purpose of a Snapshot test. The purpose of the Snapshot test is to identify whether there is a difference, meaning whether the rendered HTML is any different than what is expected.
What purpose does Enzyme serve in testing a React app? Enzyme provides the mount and shallow functions, which allow you to fake the mounting lifecycle functions and thus enable you to test whether the rendered HTML matches the expected HTML.

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