@caner404
Posted
Hi Alejandro, I think your solution turned out well. Especially the animations are great. I have two small suggestions for improvement.
I would use an array.map() at this point to reduce code duplication.
<div className="container-buttons">
//instead of this
<Score number={1} score={score} setScore={setScore} />
<Score number={2} score={score} setScore={setScore} />
<Score number={3} score={score} setScore={setScore} />
<Score number={4} score={score} setScore={setScore} />
<Score number={5} score={score} setScore={setScore} />
// you can do this
[1,2,3,4,5].map((value) => <Score number={value} score={score} setScore={setScore} />
</div>
The counter is a nice idea, but I think it would make more sense if it went down instead of up. At the moment it counts from 0 to 3 and resets the component. I would suggest that it goes down from 3 to 0.
Marked as helpful
@adelayglesiafleitas
Posted
Hello @caner404, great 2 suggestions, thank you very much! I will apply them to the challenge as soon as I have time. Your input is greatly appreciated.