Skip to content

add task solution#4176

Open
vpovierienov wants to merge 6 commits intomate-academy:masterfrom
vpovierienov:develop
Open

add task solution#4176
vpovierienov wants to merge 6 commits intomate-academy:masterfrom
vpovierienov:develop

Conversation

@vpovierienov
Copy link
Copy Markdown

DEMO LINK

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

src/App.jsx Outdated
Comment on lines +12 to +14
<Sum a={10} b={0} />
<Sum a={0} b={5} />
<Sum a={0} b={0} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +6
<p>
Sum of <strong>{a}</strong> and <strong>{b}</strong>
is <strong>{a + b}</strong>
</p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

src/App.jsx Outdated
Comment on lines +12 to +14
<Sum a={10} b={0} />
<Sum a={0} b={5} />
<Sum a={0} b={0} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 />

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link
Copy Markdown

@brespect brespect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost done, bot your DEMO LINK is not working

@vpovierienov
Copy link
Copy Markdown
Author

Almost done, bot your DEMO LINK is not working

Ok i make it normal

@vpovierienov
Copy link
Copy Markdown
Author

@vpovierienov vpovierienov requested a review from brespect April 3, 2026 13:03
Copy link
Copy Markdown

@Anton-Kuchmasov Anton-Kuchmasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants