Add Sum component - #4389
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation correctly handles all functional requirements: the Sum component properly accepts a and b props, renders the expected output, includes default values, and uses a named export. App.jsx correctly includes all five required Sum instances with varying prop values. While there is a minor style preference regarding [CHECKLIST ITEM #2] (template literals vs. separate JSX expressions), this is a formatting concern that doesn't affect functionality. Code style preferences like this are typically addressed through linter feedback rather than blocking implementation. The component produces the correct output for all test cases.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| export const Sum = ({ a = 0, b = 0 }) => ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2: Use string interpolation (template literals) inside tag content. The paragraph content should use template literal syntax like {Sum of ${a} and ${b} is ${a + b}} instead of separate JSX expressions.
DEMO LINK