Skip to content

CFarris week 2#22

Open
Misseswaddles wants to merge 4 commits into
modern-web-application-uw18:masterfrom
Misseswaddles:master
Open

CFarris week 2#22
Misseswaddles wants to merge 4 commits into
modern-web-application-uw18:masterfrom
Misseswaddles:master

Conversation

@Misseswaddles

@Misseswaddles Misseswaddles commented May 15, 2018

Copy link
Copy Markdown

Committing Week 2 Social Network. I struggled with testing. I have two test files I would love to get feedback on!

Week 1 HW Submission

Please fill out the information below in order to complete your assignment. Feel free to update this comment later if necessary.

  • Comfort rating on this assignment (1-5): 4ish. I feel like I need more work on testing.
  • Completion rating on this assignment (complete/incomplete):
    Wasn't able to complete extras. I taught myself Flexbox for this assignment, so it was slow going as I was running through tutorials. I would love to see what I needed to fix to get my snapshots to work in my code. It was fun playing around with the components.
  • Github handles of code I've reviewed:

Committing Week 2 Social Network. I struggled with testing. I have two test files I would love to get feedback on!
}
}

Missed_article.propTypes = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sure to use camelcase when naming components. Ex. MissedArticle.

Additionally, the proptypes for both article components are a little off. The components use image, title, or description, but they're all based on article. So you'll want to refactor your proptypes so that these props are nested under article. Ex.

MissedArticle.propTypes = {
  article: PropTypes.shape({
    title: PropTypes.string,
    ...
  })
};

description,
image,
author
} = this.props.article;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice use of destructuring

it('renders without crashing', () => {
const div = document.createElement('div');

const item = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're pretty close with the article tests. The title, description, etc. should be nested under article. Ex.

const props = {
  article: {
    title: '',
    ...
  }
};

Comment thread social-network/src/App.js

{yourArticles.map((article, idx) => {
return <Article key={idx} article = {article}/>;
})}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

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