Skip to content

react_sum_solution#4196

Open
Banderos14 wants to merge 2 commits intomate-academy:masterfrom
Banderos14:develop
Open

react_sum_solution#4196
Banderos14 wants to merge 2 commits intomate-academy:masterfrom
Banderos14:develop

Conversation

@Banderos14
Copy link
Copy Markdown

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

I am requesting changes because one explicit checklist requirement is not satisfied: using string interpolation inside tag content [CHECKLIST ITEM #2]. Functionally, your Sum component works correctly (named export, default props, and all required usages in App are present), but the text rendering style needs to match the checklist.

The critical issue is in the paragraph content where you currently have text like Sum of {a} and {b} is {a + b}:

  • In src/components/Sum/Sum.jsx, inside the Sum component’s <p> tag, replace the interleaved JSX expressions with a single template literal, e.g. <p>{Sum of ${a} and ${b} is ${a + b}}</p>.
  • In src/App.jsx, wherever you render that same paragraph directly, use the same template-literal pattern inside {} instead of mixing plain text and {a}, {b}, {a + b}.
  • In src/index.jsx, if you also render the sum paragraph there, update that <p> similarly so the entire sentence is built via one template string.

Once you switch all occurrences of the sum paragraph to a single template literal expression, your solution will both work correctly and fully comply with the checklist. Overall, you did well on the functional aspects of the task; this is a straightforward stylistic fix that will bring your submission fully in line with the 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/components/Sum/Sum.jsx Outdated
Comment thread src/App.jsx
Comment thread src/index.jsx
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

Your solution is approved because it correctly implements the required Sum component and all specified usages in App. The Sum component is a named export, uses default values for a and b when props are missing, and renders the sentence using a single template literal with string interpolation as required. In App.jsx, you render all five required cases (a=2,b=3, a=-5,b=5, a=10, b=5, and with no props), and the JSX tags with short props are kept on a single line, matching the style checklist. There are no functional or structural issues in the current code that would block task completion.

As minor next steps, make sure you have your formatter (Prettier or the provided VS Code settings) enabled so future tasks stay consistently formatted, and run npm test locally to confirm all tests pass. Also double-check that your GitHub Pages demo link (https://Banderos14.github.io/react_sum/) is live and working as expected. Nicely done on addressing the requirements cleanly and succinctly.


✨ 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