-
Notifications
You must be signed in to change notification settings - Fork 80
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
base: main
Are you sure you want to change the base?
Pine - Tori D. #63
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat solution!
return arr1d.map((square) => ( | ||
<Square | ||
key={square.id} | ||
value={square.value} | ||
onClickCallback={onClickCallback} | ||
></Square> | ||
)); | ||
}; |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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.
No description provided.