add task solution#4275
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. All functional requirements are met: the Sum component correctly accepts a and b props with default values of 0, uses named export, and all five required Sum instances are present in App.jsx with proper one-line formatting. While there is a checklist preference ([CHECKLIST ITEM #3]) for using template literals over JSX expression concatenation in the paragraph content, this is a style preference rather than a functional blocker—both approaches produce identical output. The code is working correctly and fulfills all core task requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| @@ -1,13 +1,14 @@ | |||
| import React from 'react'; | |||
| import './App.scss'; | |||
| import { Sum } from './components/Sum/Sum'; | |||
There was a problem hiding this comment.
This violates checklist item #2 which requires using string interpolation (template literals) inside tag content. Use: {Sum of ${a} and ${b} is ${a + b}}
| // export const Sum = () => (); | ||
| export const Sum = ({ a = 0, b = 0 }) => ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
CHECKLIST ITEM #3 VIOLATION: The paragraph content uses JSX expression concatenation (Sum of {a} and {b} is {a + b}) instead of template literals. According to the checklist, use: {Sum of ${a} and ${b} is ${a + b}}
DEMO LINK