Skip to content

Ryan Burke - HW 2 Complete#8

Open
rburke012 wants to merge 1 commit into
modern-web-application-uw18:masterfrom
rburke012:master
Open

Ryan Burke - HW 2 Complete#8
rburke012 wants to merge 1 commit into
modern-web-application-uw18:masterfrom
rburke012:master

Conversation

@rburke012

Copy link
Copy Markdown

CSS could use some work (especially bottom container)

@bhague1281 bhague1281 left a comment

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.

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

Comment thread social-network/src/App.js
<h1>For you</h1>
{
your.map(function(yourJson){
return <div class="wrapper">

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'll want to use className for all the CSS classes in React. Check the browser dev tools for the error this throws.

Comment thread social-network/src/App.js
<li>{yourJson.author.name}</li>
<li>{yourJson.postedDate} {yourJson.minutesToRead + " min read"} </li>
</ul>
</div>;

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 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".

Comment thread social-network/src/App.js
<br></br>
<h1>In case you missed it</h1>
{
missed.map(function(missedJson){

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.

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.

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