Skip to content

add task solution#3902

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

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

Conversation

@pshy4ok
Copy link
Copy Markdown

@pshy4ok pshy4ok commented Sep 30, 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 functionally correct and well-structured, but it violates a critical checklist requirement regarding string construction in the Sum component, which is considered a blocker for this task. Specifically, in src/components/Sum/Sum.jsx, the paragraph content is split across multiple JSX nodes (Sum of {a} and {b} is {a + b}) instead of using a single template-literal interpolation as required by [CHECKLIST ITEM #2] and implementation requirement 3.3.

  • What to fix (critical): In src/components/Sum/Sum.jsx, update the <p> so its entire content is produced by a single string interpolation expression, e.g., <p>{Sum of ${a} and ${b} is ${a + b}}</p>.

Everything else looks good: named export, default values for a and b, and the App renders the five required Sum instances correctly. Make this one-line change and you should meet all requirements. Nice work overall—just align the paragraph content with the template-literal rule to pass.


✨ 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 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: "2. [CODE STYLE] - Use string interpolation inside tag content". The paragraph currently breaks the sentence into multiple JSX nodes (Sum of {a} and {b} is {a + b}) instead of using a single template literal. Also this breaches implementation requirement 3.3 which requires the paragraph’s content be created using a single string interpolation expression.

Consider changing the line to a single interpolation, for example:

<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>

That will produce the exact required sentence in one string expression and satisfy the checklist and implementation requirements.

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 met: the Sum component is a named export, uses default values (a = 0, b = 0), and renders the exact paragraph format using a single template literal. In App.jsx, you correctly render the five required Sum instances (2,3), (-5,5), (10 only), (b=5 only), and with no props, each on a single line [CHECKLIST ITEM #1]. The implementation handles negative and missing values correctly, and the interpolation is done in one expression as required [CHECKLIST ITEM #2].

Minor (non-blocking) suggestion: consider adding PropTypes to Sum for clearer intent and maintainability. Nicely done—this is ready to merge!


✨ 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