CFarris week 2#22
Open
Misseswaddles wants to merge 4 commits into
Open
Conversation
Committing Week 2 Social Network. I struggled with testing. I have two test files I would love to get feedback on!
bhague1281
reviewed
May 22, 2018
| } | ||
| } | ||
|
|
||
| Missed_article.propTypes = { |
Contributor
There was a problem hiding this comment.
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; |
Contributor
There was a problem hiding this comment.
Nice use of destructuring
| it('renders without crashing', () => { | ||
| const div = document.createElement('div'); | ||
|
|
||
| const item = { |
Contributor
There was a problem hiding this comment.
You're pretty close with the article tests. The title, description, etc. should be nested under article. Ex.
const props = {
article: {
title: '',
...
}
};|
|
||
| {yourArticles.map((article, idx) => { | ||
| return <Article key={idx} article = {article}/>; | ||
| })} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.