Skip to content

react-sum#4341

Open
Tendeeer wants to merge 1 commit into
mate-academy:masterfrom
Tendeeer:develop
Open

react-sum#4341
Tendeeer wants to merge 1 commit into
mate-academy:masterfrom
Tendeeer:develop

Conversation

@Tendeeer

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 am approving your solution because all core functional requirements are correctly implemented: the Sum component uses a named export, defaults a and b to 0, and renders the interpolated string in the required format, and App renders all the specified Sum combinations. The remaining issues are limited to layout/style of JSX tags in src/App.jsx, where some <Sum> elements with fewer than 3 short attributes are split across multiple lines instead of being on a single line, which is a stylistic checklist violation but not a functional blocker.

To align fully with the checklist [CHECKLIST ITEM #1], update those tags to single-line forms, for example:

  • Sum with two short props: <Sum a={2} b={3} />
  • Sum with one short prop: <Sum a={10} /> or <Sum b={5} />

Everything else in your implementation looks solid, so once you tidy up that formatting (and rerun npm test to be safe), your code will match both the functional and style expectations nicely.


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

Footnotes

  1. Rate AI review example

Comment thread src/App.jsx
Comment on lines +7 to +10
<Sum
a={2}
b={3}
/>

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 #1: If you have < 3 attribues on a tag and the values are short write the tag in one line (to make it easier to write and read). Here Sum has two short attributes, so it should be written like <Sum a={2} b={3} /> on a single line instead of being split across multiple lines.

Comment thread src/App.jsx
Comment on lines +11 to +14
<Sum
a={-5}
b={5}
/>

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 also violates checklist item #1: If you have < 3 attribues on a tag and the values are short write the tag in one line. Sum here has two short attributes and should be in one line, e.g. <Sum a={-5} b={5} />.

Comment thread src/App.jsx
Comment on lines +15 to +17
<Sum
a={10}
/>

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 Sum has only one short attribute, so according to checklist item #1 (If you have < 3 attribues on a tag and the values are short write the tag in one line), it should be formatted on a single line: <Sum a={10} />.

Comment thread src/App.jsx
Comment on lines +18 to +20
<Sum
b={5}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same checklist item #1 applies here: with only one short attribute, the Sum tag should be on a single line, e.g. <Sum b={5} />, rather than split across multiple lines.

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