Skip to content

react_sum - #4379

Open
NataKovbasniuk wants to merge 2 commits into
mate-academy:masterfrom
NataKovbasniuk:develop
Open

react_sum#4379
NataKovbasniuk wants to merge 2 commits into
mate-academy:masterfrom
NataKovbasniuk:develop

Conversation

@NataKovbasniuk

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

I’m requesting changes because there are two critical blockers preventing the task from meeting the requirements.

  • In src/App.jsx, lines 6–10 contain static <p> tags with hardcoded text. The task requires the App to render outputs via Sum components, not hardcoded paragraphs. Please remove those static <p> tags and ensure only Sum components (already correctly used on lines 11–15) are responsible for rendering the sums.
  • In src/components/Sum/Sum.jsx, the <p> content violates the requirement to use string interpolation [CHECKLIST ITEM #2]. The current pattern mixes literals and expressions (the checklist marks this as a bad example). Update it to use a template literal inside the JSX, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>.

Once these are fixed, the implementation should align with the task requirements. Nice work on using named exports and providing defaults; keep that as-is and focus on the content rendering changes above.


✨ 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

Comment thread src/App.jsx Outdated
Comment on lines 6 to 10
<p>Sum of 2 and 3 is 5</p>
<p>Sum of -5 and 5 is 0</p>
<p>Sum of 10 and 0 is 10</p>
<p>Sum of 0 and 5 is 5</p>
<p>Sum of 0 and 0 is 0</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.

These are static <p> tags, not Sum components. The task requires the App to contain Sum components that render the output dynamically, not hardcoded paragraphs. The actual Sum components are correctly placed on lines 11-15 - these static tags are redundant and incorrect.

Comment on lines +3 to +4
<p>
Sum of {a} and {b} is {a + b}

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: Use string interpolation inside tag content. The checklist shows this pattern as a BAD EXAMPLE. Replace with template literal: <p>{Sum of ${a} and ${b} is ${a + b}}</p>

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

I am approving your solution. The Sum component correctly accepts a and b props with sensible defaults, uses a named export, and renders the expected text format. In App.jsx, all five Sum instances are rendered with the specified prop configurations, and the previously noted static paragraphs have been removed. The component tags adhere to the style requirement of using two or fewer attributes on a single line for readability [CHECKLIST ITEM #1]. There are no functional or requirement-related issues observed, and everything aligns with the task’s core specifications. Nicely done keeping the implementation clean and focused.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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.

2 participants