added the t.hanks component to the end of the presentation#1
Open
thechutrain wants to merge 1 commit intomasterfrom
Open
added the t.hanks component to the end of the presentation#1thechutrain wants to merge 1 commit intomasterfrom
thechutrain wants to merge 1 commit intomasterfrom
Conversation
nickav
approved these changes
Jun 13, 2019
| constructor() { | ||
| super(); | ||
| this.state.message = 'T.hanks'; | ||
| this.state.numOfHanks = 1; |
Owner
There was a problem hiding this comment.
nit: prefer this.state = {} in constructor
nit: prefer instance variable syntax without constructor state = { message: '', numOfHanks: 1 }
| } | ||
| } | ||
|
|
||
| const tHanksMeme = (props) => ( |
Owner
There was a problem hiding this comment.
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( |
Owner
There was a problem hiding this comment.
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({ |
Owner
There was a problem hiding this comment.
nit: component names are UpperCamelCase, this should be an explicit render e.g. <THanksMeme key={i} />
| .thanks-container { | ||
| margin-top: 10px; | ||
| } | ||
| .thanks-row { |
Owner
There was a problem hiding this comment.
nit: ^ use prettier to format files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features: