Skip to content

add task solution#4171

Open
katrysyar wants to merge 2 commits intomate-academy:masterfrom
katrysyar:develop
Open

add task solution#4171
katrysyar wants to merge 2 commits intomate-academy:masterfrom
katrysyar:develop

Conversation

@katrysyar
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! I am approving your solution as it meets all the functional requirements. The Sum component correctly handles props and default values, and it's implemented properly in the App component.

There is a minor code style improvement I'd like to point out in src/components/Sum/Sum.jsx. While your implementation <p>Sum of {a} and {b} is {a + b}</p> is functionally correct, the project guidelines [CHECKLIST ITEM #2] recommend using a single template literal for better readability, like this: <p>{`Sum of ${a} and ${b} is ${a + b}`}</p>.

This is just a stylistic suggestion for the future. Great job overall!


✨ 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'. While this approach works, wrapping the entire sentence in a single template literal (e.g., {`Sum of ${a} and ${b} is ${a + b}`}) is a cleaner and more readable way to embed expressions within a string, as recommended in the task instructions.

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