Create Sum component with props#4304
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation is functionally correct and meets all the core requirements from the task description—the Sum component renders the proper output format "Sum of X and Y is Z", uses named export, handles defaults to 0, and all 5 Sum variations are present in App. However, checklist item #2 is violated: the paragraph content uses separate JSX expressions ({a}, {b}, {a + b}) instead of the required template literal syntax. Replace the paragraph content with a single template literal: {Sum of ${a} and ${b} is ${a + b}}. This is a specific coding style requirement from the checklist that needs to be addressed before approval.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| import { Sum } from './components/Sum/Sum'; | ||
|
|
There was a problem hiding this comment.
Checklist Item #2 Violation: This uses individual JSX expressions instead of template literal string interpolation. Use {`Sum of ${a} and ${b} is ${a + b}`} inside the paragraph.
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2: Use string interpolation inside tag content. Replace with template literal: {Sum of ${a} and ${b} is ${a + b}}
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation meets all requirements successfully. The Sum component correctly uses template literal syntax for the paragraph text, implements proper default values, and uses a named export. The App component contains all 5 required Sum instances with the specified prop combinations, and all JSX tags with fewer than 3 short attributes are properly formatted on single lines. No issues remain and all tests are passing. Great work on the corrections!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
[DEMO LINK] https://eg3844540-svg.github.io/react_decompose/