-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added the t.hanks component to the end of the presentation #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few nitpicks, otherwise lgtm!
constructor() { | ||
super(); | ||
this.state.message = 'T.hanks'; | ||
this.state.numOfHanks = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer this.state = {}
in constructor
nit: prefer instance variable syntax without constructor state = { message: '', numOfHanks: 1 }
} | ||
} | ||
|
||
const tHanksMeme = (props) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make this a static property of the Thanks
component or move this above the Thanks component class definition
for (let i = 1; i <= this.state.numOfHanks; i++) { | ||
const currHanksRow = []; | ||
for (let j = 1; j <= this.state.numOfHanks; j *= 2) { | ||
currHanksRow.push( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer lowerCamelCase for var names
nit: prefer doing maps in the render block rather than accumulating data before
const currHanksRow = []; | ||
for (let j = 1; j <= this.state.numOfHanks; j *= 2) { | ||
currHanksRow.push( | ||
tHanksMeme({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: component names are UpperCamelCase, this should be an explicit render e.g. <THanksMeme key={i} />
.thanks-container { | ||
margin-top: 10px; | ||
} | ||
.thanks-row { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ^ use prettier to format files
Features: