Skip to content

add solution#3835

Closed
Aiiyuu wants to merge 2 commits into
mate-academy:masterfrom
Aiiyuu:dev
Closed

add solution#3835
Aiiyuu wants to merge 2 commits into
mate-academy:masterfrom
Aiiyuu:dev

Conversation

@Aiiyuu
Copy link
Copy Markdown

@Aiiyuu Aiiyuu commented Aug 28, 2025

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 implementation is close, but there are two critical blockers that violate explicit checklist items and likely test expectations.

  • Critical issues to fix:

    1. src/App.jsx
      • Issue (Checklist #1): The 3rd, 4th, and 5th usages of Sum pass explicit zeros instead of omitting props.
        • Lines (approx): where you have \<Sum a={10} b={0} />, \<Sum a={0} b={5} />, and \<Sum a={0} b={0} />.
        • Why: The requirement states to render exactly: \<Sum a={10} />, \<Sum b={5} />, and \<Sum /> so that defaults are exercised and tests can match expected usage.
        • How to fix: Remove the unnecessary props:
          • Change \<Sum a={10} b={0} /> to \<Sum a={10} />
          • Change \<Sum a={0} b={5} /> to \<Sum b={5} />
          • Change \<Sum a={0} b={0} /> to \<Sum />
    2. src/components/Sum/Sum.jsx
      • Issue (Checklist #2): The <p> content is built with multiple expressions instead of a single string interpolation.
        • Lines (approx): the <p> that renders a, b, and a + b separately.
        • Why: The requirement mandates a single interpolation block for readability and to satisfy tests.
        • How to fix: Use one template literal: {Sum of ${a} and ${b} is ${a + b}} inside the <p>.
  • What you did well:

    • Correct named exports and clean component structure.
    • Proper defaulting of a and b to 0, ensuring robustness.

Please make these quick adjustments and resubmit. You’re very close—nice work so far!


✨ 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: 'In App, render the Sum component five times with the following props: ... a={10} only (no b prop), b={5} only (no a prop), no props at all'. You should render <Sum a={10} />, <Sum b={5} />, and <Sum /> instead of passing explicit zeros for missing props.

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.

This violates checklist item #1: 'In App, render the Sum component five times with the following props: ... a={10} only (no b prop), b={5} only (no a prop), no props at all'. You should render <Sum a={10} />, <Sum b={5} />, and <Sum /> instead of passing explicit zeros for missing props.

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.

This violates checklist item #1: 'In App, render the Sum component five times with the following props: ... a={10} only (no b prop), b={5} only (no a prop), no props at all'. You should render <Sum a={10} />, <Sum b={5} />, and <Sum /> instead of passing explicit zeros for missing props.

Comment thread src/components/Sum/Sum.jsx Outdated
// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<p>
Sum of {a} and {b} is {a + b}
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 #2: 'Use string interpolation inside tag content to form the sentence within a single interpolation block, not by concatenating multiple expressions or split literals.' Consider using a single template literal expression inside the

tag, e.g., {Sum of ${a} and ${b} is ${a + b}}.

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: APPROVE

Your implementation fully meets the task requirements. The Sum component uses named export, defaults a and b to 0, and renders exactly: Sum of {a} and {b} is {a + b} in a single <p>. In App.jsx, you render the five required <Sum> instances with the correct props on single lines, and the import uses named syntax. There are no critical issues or blockers; functionality and formatting are correct.

Nice work keeping the code clean and concise. You're good to proceed!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

@Aiiyuu Aiiyuu closed this by deleting the head repository Feb 28, 2026
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