fac25 / fac25-week5-Lisa-Manoela

Memory game
https://mellow-stardust-0186d5.netlify.app/
0 stars 0 forks source link

Creation of components #29

Closed Glombort closed 2 years ago

Glombort commented 2 years ago

I found this code super easy to read and was really nicely written, especially all of the nice components made.

Putting it through my work linter it cautioned about the use nested components when creating your <Info> component. It is safer to create the component outside of the parent component <Game> either in the same file or in a modularised component file see here for some reasoning (that probably goes into too much detail about the reasons, but there's a nice example at the start😃)

https://github.com/fac25/fac25-week5-Lisa-Manoela/blob/a548b0105ccfe4c88c0433d74ce0af5544e3d6de/src/Game.jsx#L132-L143

Glombort commented 2 years ago

Oh my linter also picked up a very minor, and probably something I'd do had it not come up underlined https://github.com/fac25/fac25-week5-Lisa-Manoela/blob/a548b0105ccfe4c88c0433d74ce0af5544e3d6de/src/Game.jsx#L110

But because the ternary operator is a very nice check for true or false this would return the same: match = matched[0] === matched[1]

ivan-unfolds commented 2 years ago

+1 for both of these