Skip to content

add task solution#4285

Closed
zubchenko-maksym wants to merge 1 commit into
mate-academy:masterfrom
zubchenko-maksym:develop
Closed

add task solution#4285
zubchenko-maksym wants to merge 1 commit into
mate-academy:masterfrom
zubchenko-maksym:develop

Conversation

@zubchenko-maksym
Copy link
Copy Markdown

DEMO LINK and add it to the PR description.

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 is functionally correct - all 5 test cases pass, props with defaults are handled properly, and the named export is used correctly. However, there are style violations from the checklist that should be addressed. In src/components/Sum/Sum.jsx, the paragraph currently mixes plain text with JSX expressions {a}, {b}, and {a + b}. Per [CHECKLIST ITEM #2] and [CHECKLIST ITEM #3], this should use template literal string interpolation instead: `Sum of ${a} and ${b} is ${a + b}`. Additionally, in src/App.jsx, the Sum component tags with 2 attributes should be written on a single line per [CHECKLIST ITEM #2] (e.g., <Sum a={2} b={3} /> rather than spanning multiple lines). These are code style issues rather than functional bugs, so your solution works correctly. Run your linter to auto-fix the formatting issues, and you'll be all set!


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

Footnotes

  1. Rate AI review example

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: use string interpolation inside tag content. The content mixes plain text with JSX expressions {a}, {b}, and {a + b} instead of using a template literal like {Sum of ${a} and ${b} is ${a + b}}.

Comment thread src/App.jsx
<p>Sum of 0 and 0 is 0</p>
{/* Replace paragraphs with Sum componets */}
{/* And remove commented lines :) */}
<Sum a={2} 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.

This violates checklist item #2: When a tag has fewer than 3 attributes and short values, write it in one line. Change to <Sum a={2} b={3} />

Comment thread src/App.jsx
{/* Replace paragraphs with Sum componets */}
{/* And remove commented lines :) */}
<Sum a={2} b={3} />
<Sum a={-5} 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 checklist item #2: When a tag has fewer than 3 attributes and short values, write it in one line. Change to <Sum a={-5} b={5} />

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 #3: Use template literal string interpolation inside the tag content. Change to {Sum of ${a} and ${b} is ${a + b}}

@zubchenko-maksym zubchenko-maksym deleted the develop branch May 21, 2026 13:42
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