Skip to content

Solution#3856

Open
SerMamchur wants to merge 2 commits into
mate-academy:masterfrom
SerMamchur:develop
Open

Solution#3856
SerMamchur wants to merge 2 commits into
mate-academy:masterfrom
SerMamchur:develop

Conversation

@SerMamchur
Copy link
Copy Markdown

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
    1. On the instance where you intend to test only a provided (likely around the 3rd render), you currently pass a={10} b={0}. This violates checklist item #1 and the requirement to test defaulting of missing props. Update it to: <Sum a={10} />
    2. On the instance intended to test only b provided (likely the 4th render), you currently pass a={0} b={5}. This should omit a to verify it defaults to 0:
    3. 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:

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 Sum usages are on a single line with short props—nice adherence to style.
  • Sum.jsx correctly 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/App.jsx Outdated
{/* And remove commented lines :) */}
<Sum a={2} b={3} />
<Sum a={-5} b={5} />
<Sum a={10} b={0} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/App.jsx Outdated
<Sum a={2} b={3} />
<Sum a={-5} b={5} />
<Sum a={10} b={0} />
<Sum a={0} b={5} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: This should be to test defaulting of a to 0, not .

Comment thread src/App.jsx Outdated
<Sum a={-5} b={5} />
<Sum a={10} b={0} />
<Sum a={0} b={5} />
<Sum a={0} b={0} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: This should be to test defaulting of both a and b to 0, not .

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants