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

Karinna Iniguez - Inspiration Board - Octos #31

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

Conversation

karinnainiguez
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. The user inputs text and selects an emoji from the form. The form updates on changes to update the state and keep track of what the user types/selects. Then, when the user submits the form, the usual submit event is prevented and then the addCardCallbback function is called. The callback is defined in the parent, because the collection of cards needs to be updated in that action.
How did you learn how to use the API? I looked at the documentation and sent some get, post, and delete requests through postman to look at the response.
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 componentDidMount for the first time I load up the cards. Then I used the componentDidUpdate when the user selects another card (not exactly working yet :( ). These lifecycle methods allow me to send the API request, or do any actions I need to do after the components have been built.
Explain the purpose of a Snapshot test. To make sure that the structure and html tags necessary are still there after changes are made to the components.
What purpose does Enzyme serve in testing a React app? It lets us use the functions that create the snapshot so we can compare future snapshots to the one saved.

@CheezItMan
Copy link

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits, and good commit messages
Comprehension questions Check
General
Card Component renders the data provided as props Check
Board Component takes a URL and renders the list of Cards and passes in callback functions Check
NewCardform Component is a controlled form and uses a callback function to return entered data to the parent component Check
API
GET request made in componentDidMount Check
DELETE request made in callback function Check
POST request made in callback function passed to NewCardForm component. Check, but you've got a bug when you add a card which make it hard to delete that same card without reloading.
Snapshot testing Check
Styling Check, nicely done
Overall Well done, you hit almost all the learning goals. See my inline note about your bug with adding cards.


.then((response) => {
let updatedCards = this.state.cards;
updatedCards.push({card});

Choose a reason for hiding this comment

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

You're adding the card, but not using the ID from the API.

Instead you should do:

card.id = response.data.card.id

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