Skip to content

Space - Leah, Lee, Faezeh#17

Open
faezeh-ashtiani wants to merge 27 commits into
Ada-C13:masterfrom
faezeh-ashtiani:master
Open

Space - Leah, Lee, Faezeh#17
faezeh-ashtiani wants to merge 27 commits into
Ada-C13:masterfrom
faezeh-ashtiani:master

Conversation

@faezeh-ashtiani

Copy link
Copy Markdown

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? The user types in the text and/or selects an emoji in the NewCardForm. on clicking the submit button, NewCardForm calls back functions in board that can pass on the input data. The Board component makes a post request to the API and passes on the input data as params to post a new card on selected board. If the requests are successful, then the board makes a get request to retrieve updated cards.
What function did you use to make the GET request from the API to get the list of cards? Why use that function? We used the useEffect function from the React library. After the components mount, useEffect runs the getCards helper function. That function makes and API call using axios with the cards list endpoint. Since an API call might take a while, and runs asynchronously, the useEffect function allows the App to render all of its components before making the API call so the (inpatient) user is not looking at a blank page while waiting for the response.
How do snapshot tests differ from unit tests? The snapshot test compares the html produced at the time when the snapshot was run, with the current state of the program. (see note in code regarding our snapshot test)
What purpose does Enzyme serve in testing a React app? We looked up Enzyme. It is a React testing library that makes it easier to test react components. Source: https://www.codementor.io/@vijayst/unit-testing-react-components-jest-or-enzyme-du1087lh8

peachmakkoli and others added 27 commits April 23, 2020 15:45
…nto Card, successfully deletes a card upon button click
…es. made input change function to trac change of input state, made submit callback helper method for posting new card and updating the state of cards, successfully rendered new card
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