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

Danielle - Inspiration-Board #25

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

Conversation

danimetz
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. First I added the controlled form to the card class, then I needed to add the fields that we were updating in the form to the initial state. Then I added the event handlers for the on change for the card forms which could then be refactored into one function based on a parameter. Then I needed to add the function for the callback function for the onSubmit action. The onSubmit function contained the callback with all the state as the props back to the Board component. Then I reset the state of the form back to blank values so new values could be submitted.
How did you learn how to use the API? I used postman to do some get requests using the API documentation. Then I could look and see how the JSON was formatted for the calls.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? I used the componentDidMount function to get the list of cards. I wanted it to run once the intial time the page was rendered andto update the state of our application to store the data from the API.
Explain the purpose of a Snapshot test. The purpose of a snapshot test is to look and see if the component is rendering as we expect it to be.
What purpose does Enzyme serve in testing a React app? It allows us to do shallow and deep tests. A shallow test will render this component but not any of its child components. This will allow us to overlook and issues with a child component and will not cause the tests for the parent component to break.

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