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

Pine - Tori D. #63

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Pine - Tori D. #63

wants to merge 2 commits into from

Conversation

VictoriaDuke
Copy link

No description provided.

Copy link

@jbieniosek jbieniosek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on Wave 1 Tori! There was no formal LP for this project, but with wave 1 working and wave 2 started and considering the surrounding circumstances I am going to mark this as yellow. However, I recommend coming back to this project at the beginning of Capstone and working through the click callback code as a way to prep for Capstone.

// you need to return a 1D array
// of square components

}
const arr1d = [].concat.apply([], squares);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat solution!

Comment on lines +12 to +19
return arr1d.map((square) => (
<Square
key={square.id}
value={square.value}
onClickCallback={onClickCallback}
></Square>
));
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

// You will need to create a method to change the square
// When it is clicked on.
// Then pass it into the squares as a callback
const newSquares = squares.map((square) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section of code isn't working because squares is a 2D array. In this case there may be a way to get map to work (perhaps by nesting) but I recommend a nested for loop.

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