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
Choose a base branch
from

Conversation

thechutrain
Copy link
Collaborator

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

Copy link
Owner

@nickav nickav left a 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;
Copy link
Owner

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) => (
Copy link
Owner

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(
Copy link
Owner

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({
Copy link
Owner

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 {
Copy link
Owner

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

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