Skip to content

Solution#4288

Open
Vadym-fe wants to merge 3 commits into
mate-academy:masterfrom
Vadym-fe:develop
Open

Solution#4288
Vadym-fe wants to merge 3 commits into
mate-academy:masterfrom
Vadym-fe:develop

Conversation

@Vadym-fe
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 must be fixed:

  1. Explicit prop values instead of omitted props: In App.jsx, you're passing b={0} for the a={10} case, a={0} for the b={5} case, and both props for the empty case. The task explicitly requires these three usages without those extra props: <Sum a={10} />, <Sum b={5} />, and <Sum />. Passing 0 explicitly is not the same as omitting the prop—it defeats the purpose of testing default value handling.

  2. Template literals not used: In src/components/Sum/Sum.jsx, replace Sum of {a} and {b} is {a + b} with the template literal syntax {Sum of ${a} and ${b} is ${a + b}} as required by [CHECKLIST ITEM #2].

These are blocking issues because they violate explicit task requirements and checklist items.


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

This violates the requirement 'just a = 10'. The code should be <Sum a={10} /> without the b prop. The task explicitly requires these 5 different component usages, and passing b={0} explicitly is not the same as omitting the prop.

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.

This violates the requirement 'just b = 5'. The code should be <Sum b={5} /> without the a prop.

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.

This violates the requirement 'no params at all'. The code should be <Sum /> without any props.

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'. Use a template literal like: {Sum of ${a} and ${b} is ${a + b}} instead of multiple inline 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: Use template literals inside tag content. Replace Sum of {a} and {b} is {a + b} with {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

The Sum.jsx component has a critical violation of [CHECKLIST ITEM #2] which explicitly requires template literal syntax for string interpolation. Currently, the component uses plain variable interpolation: ```jsx

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

``` This must be changed to template literal syntax: ```jsx

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

``` All other requirements pass successfully — the component accepts props correctly, defaults work as expected, named export is implemented, and `App.jsx` renders all 5 Sum instances with proper prop omissions. However, the explicit checklist requirement for template literal syntax must be satisfied before approval.

✨ 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
Comment on lines 1 to +3
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.

Replace plain variable interpolation with template literal syntax as required by checklist item #2. Change {a}, {b}, and {a + b} to ${a}, ${b}, and ${a + b} wrapped in backticks.

Comment thread src/components/Sum/Sum.jsx Outdated
Comment on lines +2 to +3
<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 which requires template literal syntax for string interpolation. Replace with: {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. Both Sum.jsx and App.jsx are implemented correctly with proper template literal syntax for the string interpolation as required by the checklist. The Sum component properly accepts a and b props with default values of 0, and App.jsx renders exactly 5 instances with the specified prop combinations. Great job on getting the named export working and maintaining consistent single-line formatting for components with fewer than 3 attributes. All tests pass, so you're ready to move forward!


✨ 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