Open JulianNF opened 5 years ago
Oh! Please ignore the second issue (re: keys property) that I reported above. I've just learned the following:
Warning: Each child in a list should have a unique "key" prop.
Learning, learning, learning! 😸
You're right about that first issue. Good catch! Are you interested in making a pull request to fix the issue?
Hiya,
Thanks for the lovely tutorial @beaucarnes . I followed along with your tutorial yesterday evening, typing as you talked, in order to review React and noticed what I believe to be two wee typos/errors:
Issue 1:
Box needs
props.id
to add anid
to the given box element that it is rendering ...... however, the Grid component is passing the property
boxId
rather than the propertyid
...Issue 2:
Similarly, Grid passes the property
key
to Box, but the latter doesn't use/need it. In fact it seems that there are no other instances ofkey
in the whole JS file.Suggestions
Change the following line of Box component's render method:
to the following, which should keep things clearer and more consistent (e.g., as compared to
boxClass
):and remove the following line from Grid:
Thanks again Beau!