Skip to content

Conversation

@jessicacaley
Copy link

React Timeline

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain what purpose a component serves in React?
How does adding dynamic content to a web page in React compare to jQuery?
How did you use props in this project?
Do you have any recommendations on how we could improve this project for the next cohort?


render() {
console.log(timelineData);
const eventObjects = timelineData.events.map((event, i) => {

Choose a reason for hiding this comment

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

Looks like you are not using 'i' in this block.

Copy link

@amythetester amythetester left a comment

Choose a reason for hiding this comment

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

Great job overall!


class App extends Component {

render() {

Choose a reason for hiding this comment

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

Nice use of a variable to make the code in your return clean.


render() {
console.log(timelineData);
const eventObjects = timelineData.events.map((event, i) => {

Choose a reason for hiding this comment

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

If you take a look at the JSON, you will see that there is an Events key which is the array of statuses. Both seem to work. :)

import './Timeline.css';
import TimelineEvent from './TimelineEvent';
// testing
const Timeline = (props) => {

Choose a reason for hiding this comment

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

Very clean. Looks like you are not using 'i' in this block. You may want to consider using it as a key.

const Timeline = () => {
// Fill in your code here
return;
return (

Choose a reason for hiding this comment

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

Super clean return!

<section class="timeline-event">
<h4 class="event-person">{props.person}</h4>
<p class="event-status">{props.status}</p>
<p class="event-time"><Timestamp time={props.timestamp} /></p>

Choose a reason for hiding this comment

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

It appears that this is not actually working. The date stamps would be something like a year ago (I ran into this problem too). Consider taking a look at the JSON file. The key for timeStamp has a capital 's'. I would play around with this to see if you can see the timestamp based off of the dates in the JSON file. :)

const TimelineEvent = () => {
// Fill in your code here
return;
const TimelineEvent = (props) => {

Choose a reason for hiding this comment

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

Beautiful. Good use of classes. Would this be a place to use className instead of class?

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