complit - #4386
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation has 2 critical violations of explicit requirements that must be fixed:
-
App.jsx - Incorrect props passed: Components 3-5 explicitly pass
0values (b={0},a={0},a={0} b={0}), but the requirements explicitly state these should be "justa = 10", "justb = 5", and "no params at all". TheSumcomponent already has default values (a = 0,b = 0), so omitting these props is the correct approach. -
Sum.jsx - [CHECKLIST ITEM #2] violation: The paragraph uses separate JSX expressions
{a},{b},{a + b}instead of the required template literal. Replace with`Sum of ${a} and ${b} is ${a + b}`.
These aren't cosmetic issues— they're direct violations of stated requirements that affect task completion.
✨ 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
| {/* 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.
This violates the requirement: 'just a = 10' (no b prop). The requirement expects the b prop to be omitted entirely, not set to 0. The Sum component already has b = 0 as default, so omitting b will work correctly.
| <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.
This violates the requirement: 'just b = 5' (no a prop). The requirement expects the a prop to be omitted entirely, not set to 0. The Sum component already has a = 0 as default, so omitting a will work correctly.
| <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.
This violates the requirement: 'no params at all'. The requirement expects neither a nor b to be passed. The Sum component has both a = 0 and b = 0 as defaults, so passing no props will work correctly.
| import React from 'react'; | ||
| import './App.scss'; | ||
| import { Sum } from './components/Sum/Sum'; | ||
|
|
There was a problem hiding this comment.
This violates checklist item #2: 'Use string interpolation inside tag content'. Use template literal syntax: {Sum of ${a} and ${b} is ${a + b}}
| export const Sum = ({ a = 0, b = 0 }) => { | ||
| return ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
Checklist item #2 violation: 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 fully satisfies all task requirements. The Sum component correctly uses template literal interpolation (Sum of ${a} and ${b} is ${a + b}), has proper default values of 0 for both props, and uses a named export. In App.jsx, all Sum components properly omit explicit 0 values for optional parameters, allowing the defaults to handle them. The code follows the checklist style guidelines with single-line format for short attributes and template literals for content interpolation. Excellent work on addressing the previous issues - your solution is ready for merge.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK