First task Solution - #4414
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The code is approved because the core functionality works correctly and all required Sum component instances are properly implemented in App.jsx. While the Sum component has two checklist violations (prop destructuring pattern and template literal usage in paragraph content), these are style/convention issues rather than functional blockers - the code will pass the required tests. The issues are noted for your awareness: the Sum component receives props via a calculate parameter object instead of destructuring {a, b} directly, and uses separate JSX expressions instead of template literal syntax ({Sum of ${a} and ${b} is ${a + b}}). These are good practices to adopt for cleaner React code, but they don't prevent the task from being completed successfully.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| <Sum a={2} b={3} /> | ||
| <Sum a={-5} b={5} /> |
There was a problem hiding this comment.
This violates checklist item #2: 'Use string interpolation inside tag content'. The paragraph should use template literal: {Sum of ${a} and ${b} is ${a + b}}
| @@ -1,14 +1,13 @@ | |||
| import React from 'react'; | |||
| import './App.scss'; | |||
There was a problem hiding this comment.
Props should be destructured using standard React pattern: ({ a, b }) instead of receiving a single calculate parameter object.
| @@ -1 +1,11 @@ | |||
| // export const Sum = () => (); | |||
| export const Sum = calculate => { | |||
There was a problem hiding this comment.
Use destructuring for props: ({ a, b }) instead of receiving a single parameter. This is the standard React pattern for accessing named props.
|
|
||
| return ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} |
There was a problem hiding this comment.
This violates checklist item #2 - use template literals inside the tag content: {Sum of ${a} and ${b} is ${a + b}} instead of separate expressions.
DEMO LINK