solution#3979
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I'm requesting a few changes to align the submission with the project requirements. The main issue is in App.jsx, where the default props for the Sum component aren't being tested correctly. Instead of explicitly passing a={0} or b={0}, please omit the prop entirely in those test cases (e.g., <Sum a={10} />). This is crucial to verify that the default values are applied automatically.
There are also two checklist items to address. First, please use string interpolation for the output in Sum.jsx as specified in [CHECKLIST ITEM #2], like {`Sum of ${a} and ${b} is ${a + b}`}. Second, in App.jsx, please ensure component tags with few attributes are on a single line, following [CHECKLIST ITEM #1].
Great work on the core logic of the Sum component! With these adjustments, your solution will be perfect.
✨ 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
| <Sum | ||
| a={2} b={3} | ||
| /> |
There was a problem hiding this comment.
This violates checklist item #1: '[CODE STYLE] - If you have < 3 attribues on a tag and the values are short write the tag in one line'. This component and the others below it should be written on a single line.
| a={-5} b={5} | ||
| /> | ||
| <Sum | ||
| a={10} b={0} |
There was a problem hiding this comment.
The requirement is to render the component with 'just a = 10'. By explicitly passing b={0}, you are not testing whether the default prop for b is working as intended. Please remove b={0}.
| a={10} b={0} | ||
| /> | ||
| <Sum | ||
| a={0} b={5} |
There was a problem hiding this comment.
The requirement is to render the component with 'just b = 5'. By explicitly passing a={0}, you are not testing whether the default prop for a is working as intended. Please remove a={0}.
| @@ -1 +1,3 @@ | |||
| // export const Sum = () => (); | |||
| export const Sum = ({ a = 0, b = 0 }) => ( | |||
| <p>Sum of {a} and {b} is {a + b}</p> | |||
There was a problem hiding this comment.
This violates checklist item #2: 'Use string interpolation inside tag content'. The text content should be a single template literal for better readability, like {Sum of ${a} and ${b} is ${a + b}}.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! I am approving your submission because you have successfully addressed all the previous feedback and met every requirement. The Sum component is perfectly implemented with default props and string interpolation, and the App component now correctly tests all the necessary scenarios. The code is clean, well-structured, and follows all project guidelines. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
DEMO LINK