Skip to content
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

Open
wants to merge 1 commit into
base: master
from

Conversation

@thechutrain
Copy link
Collaborator

@thechutrain thechutrain commented Jun 13, 2019

Features:

  • t.hanks component for the last slide in the slideshow (clicking the t.hanks images results into many more t.hanks images)
  • also added url-loader to bundle image files in webpack
@nickav
nickav approved these changes Jun 13, 2019
Copy link
Owner

@nickav nickav left a comment

few nitpicks, otherwise lgtm!

constructor() {
super();
this.state.message = 'T.hanks';
this.state.numOfHanks = 1;

This comment has been minimized.

@nickav

nickav Jun 13, 2019
Owner

nit: prefer this.state = {} in constructor
nit: prefer instance variable syntax without constructor state = { message: '', numOfHanks: 1 }

}
}

const tHanksMeme = (props) => (

This comment has been minimized.

@nickav

nickav Jun 13, 2019
Owner

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(

This comment has been minimized.

@nickav

nickav Jun 13, 2019
Owner

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({

This comment has been minimized.

@nickav

nickav Jun 13, 2019
Owner

nit: component names are UpperCamelCase, this should be an explicit render e.g. <THanksMeme key={i} />

.thanks-container {
margin-top: 10px;
}
.thanks-row {

This comment has been minimized.

@nickav

nickav Jun 13, 2019
Owner

nit: ^ use prettier to format files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.