Skip to content

completed homework for week 2#6

Open
tthaman wants to merge 3 commits intofrontend-application-development-uw20:masterfrom
tthaman:complete-exercises
Open

completed homework for week 2#6
tthaman wants to merge 3 commits intofrontend-application-development-uw20:masterfrom
tthaman:complete-exercises

Conversation

@tthaman
Copy link

@tthaman tthaman commented Apr 20, 2020

Week 2 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|2|3|4|5
    2--fairly comfortable with react portion but 5 on the styling
  • Completion rating on this assignment: complete|incomplete
    complete but doesn't render just like the example

<Col>
<img alt='author' src={image} height={50} width={50} style={imgStyle}/>
</Col>
<Col xs={6}>

Choose a reason for hiding this comment

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

Bootstrap!

)
}

AuthorInfo.propTypes = {

Choose a reason for hiding this comment

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

Nice! These can also be declared within the class using the static keyword.

<Container>
<h5>For You</h5>
<Row md={2} className='homeRow'>
<Col><YourArticles data={yourData[0]}/></Col>

Choose a reason for hiding this comment

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

I think we were looking for something like

yourData.map((data,index) => 
  return (
    <Col>
      <YourArticles data={data} key={index} />
    </Col>
  ))

import PropTypes from 'prop-types';

const YourArticles = props => {
const {image, hasAudioAvailable, memberPreview, title, description, link } = {...props.data};

Choose a reason for hiding this comment

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

Suggested change
const {image, hasAudioAvailable, memberPreview, title, description, link } = {...props.data};
const {image, hasAudioAvailable, memberPreview, title, description, link } = props.data

{...props.data} is using the ES6 spread operator to take all of props.data object's keys and wrap them in a new object. props.data = {...props.data}

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