Ryan Burke - HW 2 Complete#8
Conversation
bhague1281
left a comment
There was a problem hiding this comment.
Some additional things you'll want to complete:
- Separate out the article into its own component, to make it reusable in "Your Articles" and "Missed Articles"
- In that new component, define propTypes for the props
- For that new component, write a basic test to ensure it renders
| <h1>For you</h1> | ||
| { | ||
| your.map(function(yourJson){ | ||
| return <div class="wrapper"> |
There was a problem hiding this comment.
You'll want to use className for all the CSS classes in React. Check the browser dev tools for the error this throws.
| <li>{yourJson.author.name}</li> | ||
| <li>{yourJson.postedDate} {yourJson.minutesToRead + " min read"} </li> | ||
| </ul> | ||
| </div>; |
There was a problem hiding this comment.
Nice job rendering all the data. Now that you have rendered both sets of articles, you probably noticed that there's a lot of duplication between lines 10-27 and 29-47. Perfect opportunity to create a separate React component for an "article".
| <br></br> | ||
| <h1>In case you missed it</h1> | ||
| { | ||
| missed.map(function(missedJson){ |
There was a problem hiding this comment.
Code formatting and variable naming is pretty important, especially when considering that code is read much more than written. On the next assignment, try making sure you indent your code in a consistent manner.
CSS could use some work (especially bottom container)