Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadded the t.hanks component to the end of the presentation #1
Conversation
|
few nitpicks, otherwise lgtm! |
| constructor() { | ||
| super(); | ||
| this.state.message = 'T.hanks'; | ||
| this.state.numOfHanks = 1; |
nickav
Jun 13, 2019
Owner
nit: prefer this.state = {} in constructor
nit: prefer instance variable syntax without constructor state = { message: '', numOfHanks: 1 }
nit: prefer this.state = {} in constructor
nit: prefer instance variable syntax without constructor state = { message: '', numOfHanks: 1 }
| } | ||
| } | ||
|
|
||
| const tHanksMeme = (props) => ( |
nickav
Jun 13, 2019
Owner
nit: make this a static property of the Thanks component or move this above the Thanks component class definition
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( |
nickav
Jun 13, 2019
Owner
nit: prefer lowerCamelCase for var names
nit: prefer doing maps in the render block rather than accumulating data before
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({ |
nickav
Jun 13, 2019
Owner
nit: component names are UpperCamelCase, this should be an explicit render e.g. <THanksMeme key={i} />
nit: component names are UpperCamelCase, this should be an explicit render e.g. <THanksMeme key={i} />
| .thanks-container { | ||
| margin-top: 10px; | ||
| } | ||
| .thanks-row { |
nickav
Jun 13, 2019
Owner
nit: ^ use prettier to format files
nit: ^ use prettier to format files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Features: