Skip to content

Initial#4282

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

Initial#4282
nester02 wants to merge 2 commits into
mate-academy:masterfrom
nester02:develop

Conversation

@nester02
Copy link
Copy Markdown

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

Your implementation has two critical violations that prevent task completion. First, in src/App.jsx, the Sum component usage does not match the task requirements: you explicitly pass b={0} when it should be omitted for "just a = 10", pass a={0} when it should be omitted for "just b = 5", and pass a={0} b={0} when it should be empty for "no params at all". The purpose is to test that your Sum component's default props work correctly, which requires omitting these props entirely, not passing them explicitly. Second, the Sum component violates [CHECKLIST ITEM #2] by not using template literals - change the paragraph content to use `Sum of ${a} and ${b} is ${a + b}` instead of separate JSX expressions. Please fix both issues and resubmit.


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

According to the task, this should be just a = 10 (only prop a, without passing b). Instead, the code explicitly passes b={0}, which doesn't test the default prop behavior as required.

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.

According to the task, this should be just b = 5 (only prop b, without passing a). Instead, the code explicitly passes a={0}, which doesn't test the default prop behavior as required.

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.

According to the task, this should be "no params at all" (empty). Instead, the code explicitly passes a={0} b={0}, which doesn't test the default prop behavior as required.

Comment thread src/App.jsx
@@ -1,14 +1,13 @@
import React from 'react';
import './App.scss';
import { Sum } from './components/Sum/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 tag content. The paragraph should use a template literal: {Sum of ${a} and ${b} is ${a + b}} instead of separate JSX expressions.

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.

Checklist item #2 violation: Use template literals for string interpolation. Change to: {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

Your solution is approved. All task requirements and checklist items have been satisfied: the Sum component correctly uses destructuring with default values for both a and b, renders the paragraph with template literals, and is properly exported as a named export. The App component contains all five required Sum instances with the correct props, including cases where props are entirely omitted to test default values. Both critical issues from the previous review have been successfully resolved, and no outstanding issues remain. Great work implementing the default parameter pattern correctly!


✨ 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