Skip to content

Add Solution#3843

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

Add Solution#3843
ThandekaZulu wants to merge 2 commits into
mate-academy:masterfrom
ThandekaZulu:develop

Conversation

@ThandekaZulu
Copy link
Copy Markdown

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 implementation is close, but there’s one critical blocker that violates an explicit checklist requirement.

Critical issue to fix

  • Location: src/components/Sum/Sum.jsx (in the <p> element displaying the result)
  • What’s wrong: The paragraph content is built using multiple JSX expressions ({a}, {b}, {sum}) instead of a single template literal inside one expression.
  • Why it matters: Checklist item #2 requires using a single string interpolation in the <p> content, e.g., {Sum of ${a} and ${b} is ${a + b}}. This is a strict requirement and may cause checks/tests to fail.
  • How to fix: Replace the current <p> content with a single template literal expression. Hint: compute a and b (defaulting to 0 as you do) and render <p>{Sum of ${a} and ${b} is ${a + b}}</p>.

What you did well

  • Correctly defaulted a and b to 0.
  • Implemented Sum as a named React function component.
  • App.jsx renders all required Sum instances with proper single-line formatting where applicable.

Please make the small update to the <p> content. Once that’s done, everything else looks solid—great work overall!


✨ 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

return (
<p>
Sum of {a} and {b} is {sum}
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

tag content to assemble the full sentence in one expression, e.g., {Sum of ${a} and ${b} is ${a + b}}". The current implementation uses multiple JSX expressions instead of a single template literal.

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

Why: All core requirements are fully met. The Sum component is a named export that correctly handles a and b with default values of 0, and renders exactly one paragraph with the required interpolated text: Sum of {a} and {b} is {a + b}. In App.jsx, five instances of Sum are rendered with the specified prop combinations, using the correct named import and keeping tags on a single line where appropriate.

What you did well:

  • Clean, idiomatic React with concise prop destructuring and defaults.
  • Correct string interpolation and output format.
  • Proper named export/import usage and exact instances required.

Great work—no changes needed!


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

3 participants