Skip to content

kay-inspiration-board#42

Open
kayxn23 wants to merge 11 commits intoAda-C10:masterfrom
kayxn23:master
Open

kay-inspiration-board#42
kayxn23 wants to merge 11 commits intoAda-C10:masterfrom
kayxn23:master

Conversation

@kayxn23
Copy link

@kayxn23 kayxn23 commented Dec 19, 2018

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain the steps in creating a new Card from the form. The form-fields are filled out by the user, in the meantime JavaScript dynamically interprets the entry with the help of an onChange listener which has the onFormChange() event handler that parses the event.target's names and values and calls setState to update the corresponding state of the NewCardForm. The tag contains an onSubmit listener with an event handler onSubmit() that calls a callback function addCardCallback which takes the argument this.state, then calls addCard(which lives in Board.js) to add a new card component to the Board (this.state.cards array).
How did you learn how to use the API? By reading the API documentation and testing out requests via Postman
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(), because it ensures I'm loading my app and the data that came in from the api call efficiently.
Explain the purpose of a Snapshot test. A snapshot test is used to help you keep track of when your html changes and when new functions are added to what your component returns in the render function, it prevents you from making typos and unwanted changes.
What purpose does Enzyme serve in testing a React app? Enzyme is a library that provides more convenient testing syntax. It has two methods for rendering components: Shallow and mount. shallow renders only the component you specify, and should be the default choice. Mount renders a component and all its children, and should be used only when you need to test cross-component interactions

@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
Snapshot testing Check
Styling Check
Overall Well done, you hit all the learning goals for the project. I did notice you didn't do anything with errors received from the API. Other than that, excellent work.


this.state = {
cards: [],
errorMessage: '',

Choose a reason for hiding this comment

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

You don't seem to be displaying the error messages anywhere!

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