Develop#4296
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The implementation has 2 critical violations of explicit requirements: 1. Sum.jsx uses wrong string syntax — Checklist item #2 explicitly requires template literals (string interpolation) inside tag content. The current code uses {a} and {b} concatenation, but it must use: javascript {`Sum of ${a} and ${b} is ${a + b}`} . 2. App.jsx passes unnecessary explicit default values — The task requirements specify "just a = 10", "just b = 5", and "no params at all". Your current code passes , , and . Since your Sum component already has default parameters ({ a = 0, b = 0 }), you should remove the explicit zeros: - Change to - Change to - Change to
✨ 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'; | ||
|
|
||
| export const App = () => ( | ||
| <> |
There was a problem hiding this comment.
According to checklist item #2, use template literals (string interpolation) inside tag content. Replace with: {Sum of ${a} and ${b} is ${a + b}}
| {/* And remove commented lines :) */} | ||
| <Sum a={2} b={3} /> | ||
| <Sum a={-5} b={5} /> | ||
| <Sum a={10} b={0} /> |
There was a problem hiding this comment.
The requirement specifies 'just a = 10' - remove the explicit b={0} and use:
| <Sum a={2} b={3} /> | ||
| <Sum a={-5} b={5} /> | ||
| <Sum a={10} b={0} /> | ||
| <Sum a={0} b={5} /> |
There was a problem hiding this comment.
The requirement specifies 'just b = 5' - remove the explicit a={0} and use:
| <Sum a={-5} b={5} /> | ||
| <Sum a={10} b={0} /> | ||
| <Sum a={0} b={5} /> | ||
| <Sum a={0} b={0} /> |
There was a problem hiding this comment.
The requirement specifies 'no params at all' - use:
| <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}}
| Sum of {a} and {b} is {a + b} | ||
| </p> | ||
| ); | ||
| }; |
There was a problem hiding this comment.
Task requires 'just a = 10' - do not pass b prop, let it default to 0. Change to <Sum a={10} />
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. Both Sum.jsx and App.jsx correctly implement all requirements: the Sum component properly uses template literals for string interpolation (The sum is ${a + b}), accepts a and b props with default values of 0, and uses named exports. App.jsx passes exactly the required props for all 5 Sum instances without unnecessary default values. All checklist items have been satisfied, and no issues remain. Great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK