Skip to content

add task solution#3846

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

add task solution#3846
Moddderi wants to merge 2 commits into
mate-academy:masterfrom
Moddderi:develop

Conversation

@Moddderi
Copy link
Copy Markdown

@Moddderi Moddderi commented Sep 2, 2025

No description provided.

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 app is very close—props handling, defaults, named export, and the five Sum usages in src/App.jsx all look great. However, there’s one critical blocker against the explicit checklist requirement.

Critical issue to fix (Checklist Item #2):

  • Location: src/components/Sum/Sum.jsx, the <p> rendering line (likely near the return statement, around the paragraph output).
  • What’s wrong: The paragraph text is currently built with multiple JSX expressions like {a}, {b}, and {a + b} separated by strings. The requirement explicitly states the sentence must be formed using a single template string interpolation inside the JSX content.
  • Why it matters: The task and checklist require a single template string for the output formatting, e.g., using backticks and ${...} placeholders. Not following this is an explicit requirement violation, making it a blocker.
  • How to fix: Replace the current paragraph content with a single template string interpolation, for example:
    • <p>{Sum of ${a} and ${b} is ${a + b}}</p>

Minor notes (optional):

  • Everything else (default values, named export, inline sum, App usage) is solid—no changes needed there.

Once you update the paragraph to use template string interpolation, this should be ready to approve. Nice work overall—just a quick formatting tweak to meet the exact spec!


✨ 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/components/Sum/Sum.jsx Outdated
export function Sum({ a = 0, b = 0 }) {
return (
<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 the paragraph content to form the sentence, e.g.,

{Sum of ${a} and ${b} is ${a + b}}

rather than concatenating or embedding multiple JSX expressions for fragments." The current implementation uses multiple JSX expressions instead of a single template string interpolation.

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 meets all core requirements and passes the checklist:

  • The Sum component correctly accepts a and b, defaults them to 0 when omitted, and renders the exact required paragraph using a single template string interpolation.
  • Sum is exported as a named export, and App imports it via a named import.
  • App renders all five required configurations: a=2, b=3, a=-5, b=5, a=10 (no b), b=5 (no a), and neither prop provided. All Sum usages are single-line JSX, matching the style requirement.

No critical or blocking issues were found. Nice work keeping the code clean and focused on the requirements. If you want to go further, you could add simple prop type checks with TypeScript or PropTypes, but that’s optional here. Great job!


✨ 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