Skip to content

add task solution#4247

Open
impo10nt wants to merge 1 commit into
mate-academy:masterfrom
impo10nt:develop
Open

add task solution#4247
impo10nt wants to merge 1 commit into
mate-academy:masterfrom
impo10nt:develop

Conversation

@impo10nt
Copy link
Copy Markdown

No description provided.

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 correctly fulfills all core functional requirements. The Sum component properly accepts a and b props with default values of 0, uses named export, renders the correct output format, and the App component contains all five required Sum instances. The code works as expected for all test cases. While there are two checklist style items noted (components should be on a single line when they have ≤2 attributes in App.jsx, and the output text in Sum.jsx should use template literal syntax), these are formatting/style preferences rather than functional blockers. The functionality is solid and meets the task requirements.


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

Footnotes

  1. Rate AI review example

// export const Sum = () => ();
export const Sum = ( {a = 0, b = 0} ) => {
return (
<p>Sum of {a} and {b} is {a + b}</p>
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 content should use template literals (``) with ${} syntax instead of separate JSX expressions.

GOOD EXAMPLE: <p>{Sum of ${a} and ${b} is ${a + b}}</p>

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 #1: Write tags with < 3 attributes on a single line. Components with 1-2 attributes should be written as: <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 #1: Write tags with < 3 attributes on a single line.

Comment thread src/App.jsx
{/* And remove commented lines :) */}
<Sum a={2} b={3}/>
<Sum a={-5} b={5}/>
<Sum a={10}/>
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 #1: Write tags with < 3 attributes on a single line.

Comment thread src/App.jsx
<Sum a={2} b={3}/>
<Sum a={-5} b={5}/>
<Sum a={10}/>
<Sum 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 #1: Write tags with < 3 attributes on a single line.

Comment thread src/App.jsx
<Sum a={-5} b={5}/>
<Sum a={10}/>
<Sum b={5}/>
<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 #1: Write tags with < 3 attributes on a single line.

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 template literal string interpolation inside tag content. Replace with: <p>{Sum of ${a} and ${b} is ${a + b}}</p>

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