Skip to content

props#4178

Open
VladChudin wants to merge 1 commit intomate-academy:masterfrom
VladChudin:develop
Open

props#4178
VladChudin wants to merge 1 commit intomate-academy:masterfrom
VladChudin:develop

Conversation

@VladChudin
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

Excellent work on this task! Your solution is functionally complete and meets all the requirements. The Sum component is well-implemented, handling both passed props and default values correctly. There's just one minor code style point to keep in mind for the future. In src/components/Sum/Sum.jsx, it's better to use a single template literal for string construction to improve readability, as noted in [CHECKLIST ITEM #2]. For example: {`Sum of ${a} and ${b} is ${a + b}`}. Since this is a minor style issue and everything works perfectly, I am approving your solution. Keep up the great work!


✨ 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 = ({ a = 0, b = 0 }) => {
return (
<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'. For better readability and to follow the project's style guide, please use a single template literal here: `{`Sum of ${a} and ${b} is ${a + b}`} `.

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

In the imported Sum component, the output string is constructed by mixing strings and variables. According to checklist item #2, you should use string interpolation (template literals) for this. Please refactor it to follow the 'GOOD EXAMPLE' provided in the checklist.

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