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

maryams-inspirationalboard #31

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

Conversation

marshi23
Copy link

@marshi23 marshi23 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. I created a form with the text and emoji fields in the NewCardForm component, it collects user input and passed it on to the Board component. Board sends a post request carrying the payload of the required fields filed out by the user to the api which adds the new card to the board with the provided details.
How did you learn how to use the API? The mainly followed the api documentation and used postman and to confirm that I have the right address and see the type of response I was getting back.
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 to make the api request and populate the app with the card list. The function ran after a component is mounted on the DOM tree.
Explain the purpose of a Snapshot test. It keeps a record of what we want out component to look like and it is a good reference point when we make changes to a component.
What purpose does Enzyme serve in testing a React app? Enzyme allows us to perform tests on utility functions of our components like providing shallow snapshots of them.

@CheezItMan
Copy link

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Reasonable 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 this project. You did have a small bug in displaying your error messages, because you can't push something into undefined which is what you had it initialized to initially.

errors.push(error.message)

this.setState({
errors: errors

Choose a reason for hiding this comment

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

Just a note you could do:

this.setState({
  errors,
});

import './Board.css';
import Card from './Card';
import NewCardForm from './NewCardForm';
import CARD_DATA from '../data/card-data.json';
// import CARD_DATA from '../data/card-data.json';


class Board extends Component {
constructor() {
super();

this.state = {
cards: [],

Choose a reason for hiding this comment

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

You should also initialize errors to [].

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