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 - Jansen #36

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

Sockets - Jansen #36

wants to merge 62 commits into from

Conversation

JansenMartin
Copy link

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? First, I update the form's state to reflect what's currently inside the form with an event handler that calls onInputChange. Then, I use the updated state to create a new card with an event handler that calls onSubmitCardButtonClick. This function sends the newCard info to the addCard function inside the Board component (via a callback function). From there, a POST request is submitted through axios, and the state of Board is updated to reflect the new card.
What function did you use to make the GET request from the API to get the list of cards? Why use that function? I used componentDidMount. This function is useful because it's automatically called when a component is rendered. That means it's ideal for populating a component with data...without making the user retrieve it themselves (like we've done before now).
How do snapshot tests differ from unit tests? Snapshot tests concern themselves with the DOM, and whether the page is rendering exactly how we expect. Unit tests take sections of code and determine whether they're functioning properly. In other words, unit tests make sure our logic is sound...and snapshot tests make sure our logic isn't changing how the page looks.
What purpose does Enzyme serve in testing a React app? Enzyme is a library designed by Airbnb. It gives us handy utility methods for rendering components, as well as finding and interacting with elements in our 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