Skip to content

solution#4165

Open
jk-npc wants to merge 3 commits intomate-academy:masterfrom
jk-npc:develop
Open

solution#4165
jk-npc wants to merge 3 commits intomate-academy:masterfrom
jk-npc:develop

Conversation

@jk-npc
Copy link
Copy Markdown

@jk-npc jk-npc commented Mar 21, 2026

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 on the core logic of the Sum component! It calculates the sum correctly and handles default props well. However, a couple of changes are needed to meet all the project requirements. In src/App.jsx, the Sum components are being passed an extra and word, which is incorrect JSX syntax for props. Please remove it and just separate props with a space, like <Sum a={2} b={3} />. Also, in src/components/Sum/Sum.jsx, your code violates a checklist requirement to use string interpolation [CHECKLIST ITEM #2]. Please update the paragraph to use a single template literal: {Sum of ${a} and ${b} is ${a + b}}. After these fixes, your solution will be perfect!


✨ 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

src/App.jsx Outdated
<p>Sum of 10 and 0 is 10</p>
<p>Sum of 0 and 5 is 5</p>
<p>Sum of 0 and 0 is 0</p>
<Sum a={2} and b={3} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The word 'and' is being passed as a prop here, which is incorrect. In JSX, you list props one after another separated by spaces, like <Sum a={2} b={3} />.

src/App.jsx Outdated
<p>Sum of 0 and 5 is 5</p>
<p>Sum of 0 and 0 is 0</p>
<Sum a={2} and b={3} />
<Sum a={-5} and 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 line also includes an unnecessary and prop.


return (
<p>
Sum of {a} and {b} is {result}
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'. For better readability and to follow the project's code style, please use a single template literal here. For example: {`Sum of ${a} and ${b} is ${result}`}.

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

Excellent work on this task! You've successfully addressed all the feedback from the previous review, and the functionality is implemented perfectly. The Sum component correctly calculates and displays the values, and the App component renders all required instances. As a final cleanup step, it's good practice to remove any unused code or comments from the project template in src/App.jsx and src/components/Sum/Sum.jsx. This is a great submission, and I am approving your solution.


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

Footnotes

  1. Rate AI review example

src/App.jsx Outdated
Comment on lines 12 to 13
{/* Replace paragraphs with Sum componets */}
{/* And remove commented lines :) */}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work! Now that you've implemented the components, you can remove these instructional comments.

@@ -1 +1,7 @@
// export const 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 commented-out line is left over from the project template. It's a good practice to remove any unused code or comments to keep your components clean.

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