react-sum#4341
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because all core functional requirements are correctly implemented: the Sum component uses a named export, defaults a and b to 0, and renders the interpolated string in the required format, and App renders all the specified Sum combinations. The remaining issues are limited to layout/style of JSX tags in src/App.jsx, where some <Sum> elements with fewer than 3 short attributes are split across multiple lines instead of being on a single line, which is a stylistic checklist violation but not a functional blocker.
To align fully with the checklist [CHECKLIST ITEM #1], update those tags to single-line forms, for example:
Sumwith two short props:<Sum a={2} b={3} />Sumwith one short prop:<Sum a={10} />or<Sum b={5} />
Everything else in your implementation looks solid, so once you tidy up that formatting (and rerun npm test to be safe), your code will match both the functional and style expectations nicely.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| <Sum | ||
| a={2} | ||
| b={3} | ||
| /> |
There was a problem hiding this comment.
This violates checklist item #1: If you have < 3 attribues on a tag and the values are short write the tag in one line (to make it easier to write and read). Here Sum has two short attributes, so it should be written like <Sum a={2} b={3} /> on a single line instead of being split across multiple lines.
| <Sum | ||
| a={-5} | ||
| b={5} | ||
| /> |
There was a problem hiding this comment.
This also violates checklist item #1: If you have < 3 attribues on a tag and the values are short write the tag in one line. Sum here has two short attributes and should be in one line, e.g. <Sum a={-5} b={5} />.
| <Sum | ||
| a={10} | ||
| /> |
There was a problem hiding this comment.
This Sum has only one short attribute, so according to checklist item #1 (If you have < 3 attribues on a tag and the values are short write the tag in one line), it should be formatted on a single line: <Sum a={10} />.
| <Sum | ||
| b={5} | ||
| /> |
There was a problem hiding this comment.
Same checklist item #1 applies here: with only one short attribute, the Sum tag should be on a single line, e.g. <Sum b={5} />, rather than split across multiple lines.
DEMO LINK