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

Edges - Katrina - Inspiration Board #22

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

Conversation

kaganon
Copy link

@kaganon kaganon commented Dec 17, 2018

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain the steps in creating a new Card from the form. To create a new card from the form, I had to use an event handler in the NewCardForm component that when submitted, triggers a callback function (with the updated state as a parameter), and pass that function up to Board. In Board, there's a function called addCard that runs an axios POST request to the inspiration-board API and posts the data to the API.
How did you learn how to use the API? I read the documentation provided from the inspiration-board API and also experimented with what the expected responses would be on Postman.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? The function componentDidMount was used for the GET request from the API. We use this function to load in any external data first and use state to manage, retrieve, and display the data from the API.
Explain the purpose of a Snapshot test. Snapshot test is used to detect changes in our components and see the differences when those changes happens (the diff).
What purpose does Enzyme serve in testing a React app? Enzyme is a library that helps with testing our components by providing two functions to create the Snapshot (shallow and mount). Shallow rendering is used for testing a single component in isolation, while mount is used for rendering the entire component and their subcomponents to test their interactions.

@tildeee
Copy link

tildeee commented Dec 21, 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 x
Styling x
Overall

Marvelous work on this Katrina! This project looks great, and in particular, this code is really well structured and organized and elegant.

I only have one comment on code, but otherwise, I'm super happy and this is a fantastic submission! Nice work


this.state = {
cards: [],
};
}

componentDidMount() {

const url = `${this.props.url}/boards/katrina/cards`;
Copy link

Choose a reason for hiding this comment

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

I like how you constructed this URL! Maybe you could've used the prop boardName if you had set it to katrina (passed in from App)

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