Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Changes are needed before this solution can be considered complete, because the current App.jsx implementation breaks both compilation and the required usage pattern of the Sum component. In src/App.jsx around lines 6–10, you render <Sum /> multiple times but never import it, which triggers the ESLint react/jsx-no-undef error and a runtime ReferenceError: Sum is not defined; you should add a named import at the top such as import { Sum } from './components/Sum/Sum';. The third Sum usage in App.jsx currently passes both a and b, but the task requires that instance to be rendered with just a = {10}, so you need to remove the b prop there. Similarly, the fourth Sum usage explicitly passes a={0} along with b={5}, while the requirement is to render that instance with just b = {5} and rely on the default a = 0, so the explicit a prop should be removed. The Sum component itself in src/components/Sum/Sum.jsx looks good: it uses a named export, defaults a and b to 0, renders inside a <p>, and uses string interpolation as required. Once you import Sum correctly and adjust those two prop usages to match the exact specification, the app should compile cleanly and align with the task’s requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| <p>Sum of 0 and 0 is 0</p> | ||
| {/* Replace paragraphs with Sum componets */} | ||
| {/* And remove commented lines :) */} | ||
| <Sum a={2} b={3} /> |
There was a problem hiding this comment.
The Sum component is used here but not imported in this file. Add a named import for the component (for example: import { Sum } from './components/Sum/Sum';) so the JSX compiles and uses the exported Sum.
| {/* And remove commented lines :) */} | ||
| <Sum a={2} b={3} /> | ||
| <Sum a={-5} b={5} /> | ||
| <Sum a={10} /> |
There was a problem hiding this comment.
This line violates the core requirement 'just a = 10' — currently you pass both a and b. Remove the b prop so this Sum is rendered with only a={10}.
| <Sum a={2} b={3} /> | ||
| <Sum a={-5} b={5} /> | ||
| <Sum a={10} /> | ||
| <Sum b={5} /> |
There was a problem hiding this comment.
This line violates the core requirement 'just b = 5' — currently you pass a={0} explicitly. Remove the a prop so this Sum is rendered with only b={5} (you can rely on the default a = 0).
|
Done |
No description provided.