Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Good job implementing the core logic for the Sum component. However, some changes are needed before this can be approved. All the automated tests are failing due to a small formatting error in your output string in src/components/Sum/Sum.jsx. It looks like you're missing a space before the word "is".
Additionally, in src/App.jsx, the task requires you to demonstrate the default props by omitting them, not by passing 0. For example, you should use <Sum a={10} /> to test the default value of b. Please also update the component to use a single template literal for the output as required by the project checklist [CHECKLIST ITEM #2].
✨ 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
src/App.jsx
Outdated
| <Sum a={10} b={0} /> | ||
| <Sum a={0} b={5} /> | ||
| <Sum a={0} b={0} /> |
There was a problem hiding this comment.
The task description asks you to render Sum components with 'just a=10', 'just b=5', and 'no params at all'. This is to test the default props functionality in the Sum component. By explicitly passing 0 for the missing props, you are not letting the component use its default values. Please adjust these lines to omit the props that should be taking on their default values.
src/components/Sum/Sum.jsx
Outdated
| <p> | ||
| Sum of <strong>{a}</strong> and <strong>{b}</strong> | ||
| is <strong>{a + b}</strong> | ||
| </p> |
There was a problem hiding this comment.
This violates checklist item #2, which recommends using string interpolation inside the tag content.
The task description doesn't require the numbers to be bold. Consider removing the <strong> tags to simplify the implementation and use a single template literal as shown in the checklist example. This will make the code cleaner and align with the project's code style.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job getting the Sum component working perfectly! The implementation in src/components/Sum/Sum.jsx now meets all requirements.
I am requesting changes because src/App.jsx still needs one final adjustment. To properly demonstrate how default props work, you need to omit the props that should use their default value, rather than explicitly passing 0.
Here’s how to update the calls:
- Change
<Sum a={10} b={0} />to<Sum a={10} /> - Change
<Sum a={0} b={5} />to<Sum b={5} /> - Change
<Sum a={0} b={0} />to<Sum />
Once that's updated, you'll be all set!
✨ 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
src/App.jsx
Outdated
| <Sum a={10} b={0} /> | ||
| <Sum a={0} b={5} /> | ||
| <Sum a={0} b={0} /> |
There was a problem hiding this comment.
To properly test the default props feature, you should omit the props that are meant to default to 0.
This should be:
<Sum a={10} />
<Sum b={5} />
<Sum />
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on the React components! Your implementation of Sum and App is clean, correct, and perfectly demonstrates how to use default props.
I'm approving this submission as an educational exception because while your code is great, there's a configuration issue causing the automated checks to fail. The problem is in your package.json file, where the version of vite (^8.0.3) is incompatible with @vitejs/plugin-react.
To fix this for future projects, you can downgrade vite to a compatible version like ^5.2.0:
// package.json
"devDependencies": {
"vite": "^5.2.0"
}Resolving dependency conflicts is a common task, so this is a great learning opportunity. Fantastic job on the components themselves!
✨ 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
brespect
left a comment
There was a problem hiding this comment.
Almost done, bot your DEMO LINK is not working
Ok i make it normal |
DEMO LINK