Solution#3856
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Decision: REQUEST_CHANGES
Your Sum component is well-implemented and meets the requirements, but there’s a critical blocker in src/App.jsx related to testing default prop behavior, which violates the checklist and core requirements.
Issues to fix (critical):
- Location:
src/App.jsx- On the instance where you intend to test only
aprovided (likely around the 3rd render), you currently passa={10} b={0}. This violates checklist item #1 and the requirement to test defaulting of missing props. Update it to:<Sum a={10} /> - On the instance intended to test only
bprovided (likely the 4th render), you currently passa={0} b={5}. This should omitato verify it defaults to 0:
- On the instance intended to test both defaults (likely the 5th render), you currently pass
a={0} b={0}. To actually test both defaults, omit both props:
- On the instance where you intend to test only
Why this matters: The assignment explicitly requires verifying defaulting by omitting props. Passing explicit zeros doesn’t exercise the default parameter logic in Sum and fails the checklist item about rendering inline with short props while testing defaults.
Minor notes (good work):
- All
Sumusages are on a single line with short props—nice adherence to style. Sum.jsxcorrectly uses destructuring defaults and a named export.
Make these small changes in App.jsx, and you should be all set. Great job overall—this is a quick fix!
✨ 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 checklist item #1: "When rendering Sum instances in App with fewer than 3 attributes and short values, place the entire tag on one line (e.g., )" AND the requirement to test defaulting behavior. You should render (without b), (without a), and (with no props) to test default values. Currently, you are passing explicit zeros, which does not test the defaulting logic.
| <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.
Same as above: This should be to test defaulting of a to 0, not .
| <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.
Same as above: This should be to test defaulting of both a and b to 0, not .
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work! All core requirements are fully met: the Sum component correctly defaults missing a and b to 0, renders exactly one <p> with the required text format, and is exported as a named export. In App.jsx, you render all five required instances to cover both normal and defaulted prop scenarios, each on a single line as specified. The implementation is clean, concise, and aligns with the checklist. No blockers or issues found. Nice job—this is ready to submit!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
https://SerMamchur.github.io/react_sum/