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

Semret Nicodimos - Inspiration-board - Edges #21

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

Conversation

snicodimos
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. One the input is recorded via a state change, that recorded object is passed up to boards via a callback function. In board there is an addcard function that composes the messages from new form and does a post request to the API of the new input.
How did you learn how to use the API? By reading the documentation provided from the ada gold account about how the API works.
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. You want to do the get request during the beginning of the life cycle when the components mounts and save it in the state. The only time it gets
Explain the purpose of a Snapshot test. When we first run the test the snapshot records how the components should look and render. That is the baseline to which changes will be compared to. If we make changes to the component the test compares changes to the snapshot and either fails or passes the tests.
What purpose does Enzyme serve in testing a React app? Enzyme provide us two methods to test our components, Shallow and Mount functions. Shallow is used for a shallow rendering and runs single components while Mount is a deep rendering the entire components including subcomponets and all the interactions.

@tildeee
Copy link

tildeee commented Dec 20, 2018

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
Card Component renders the data provided as props x
Board Component takes a URL and renders the list of Cards and passes in callback functions x
NewCardform Component is a controlled form and uses a callback function to return entered data to the parent component x
API
GET request made in componentDidMount x
DELETE request made in callback function x
POST request made in callback function passed to NewCardForm component. x
Snapshot testing exists and works but fails!
Styling x
Overall

Semret! Great work with this project. I have only a few comments on this code, and it seems like your snapshot tests fail, but just need to be updated!

Other than that, I think you did a good job with this code. Great work!

};
}
componentDidMount() {
axios.get('https://inspiration-board.herokuapp.com/boards/Semret/cards')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a good way to use the props url and boardName that the App component passes in for this (you'd need to change the boardName that App defines)

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.

2 participants