Added Sum component - #4428
Added Sum component#4428thunderTheNakedGun wants to merge 3 commits into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: NFR]
Additional info:
Ignored files list:
package-lock.jsonpackage.json
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because the props in App.jsx are passed as strings instead of numbers, which violates the requirement to use numeric values and can lead to incorrect output. Specifically, on lines 7–10, values like a="2" and b="5" should be numeric literals: a={2}, b={5}. This is a critical blocker since the task requires number props (e.g., a={2}, b={3}) and the current implementation can produce wrong sums or string concatenation.
Critical issues to fix:
App.jsxlines 7–10: changea="2"toa={2},a="-5"toa={-5},a="10"toa={10}, andb="5"tob={5}to meet the requirement and ensure correct arithmetic.
Minor improvement:
- In
Sum.jsx, if props are numeric as required,Number(a) + Number(b)is unnecessary; you can usea + bdirectly for clarity.
You’ve done well with named exports, default values, and template interpolation. Make the above corrections and you should be all set.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. All requirements are met: the Sum component correctly accepts a and b props with default values of 0, renders the sum using template literals, and uses named exports. All 5 required Sum component instances are present in App.jsx with proper numeric props (not strings), and the code follows the specified style guidelines including single-line tags for components with fewer than 3 attributes. The previous issue with string props has been successfully resolved.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
also upgraded @mate-academy/scripts to 2.1.3