Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved as an educational override so you can keep progressing while learning, even though there are a couple of small style issues to address.
You correctly implemented the core requirements: Sum is a named export, it uses default values for a and b, and App.jsx renders the five required Sum components using concise one-line JSX where appropriate. The main style issue is in src/components/Sum/Sum.jsx and src/App.jsx on the line with <p>Sum of {a} and {b} is {a + b}</p>, which conflicts with [CHECKLIST ITEM #2] Use string interpolation inside tag content. To fix this, rewrite that line to use a single template literal inside braces, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>. As a minor improvement, remove any leftover commented-out code in Sum.jsx so the file stays clean and focused. Overall, your functional work is strong, and tightening up these stylistic details will bring your code fully in line with the checklist.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| // 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.
This violates [CHECKLIST ITEM #2] "Use string interpolation inside tag content" — the paragraph uses multiple JSX expressions (Sum of {a} and {b} is {a + b}) instead of a single template string. Consider changing the content to use a template literal, e.g. <p>{Sum of ${a} and ${b} is ${a + b}}</p>.
| 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: "Use string interpolation inside tag content" — the paragraph currently uses separate text and expression insertions (Sum of {a} and {b} is {a + b}). Consider using a template literal inside braces, e.g. <p>{Sum of ${a} and ${b} is ${a + b}}</p> to match the required style.
raulriato
left a comment
There was a problem hiding this comment.
As the mentor AI suggested, you're not rendering the Sum.jsx the way it's supposed to. But, since it's not a major problem, I'll approve the task.
Thanks for the feedback. I’ll make sure to fix the issue with the Sum.jsx as Like requested. |
DEMO LINK