Skip to content

Create component - #4400

Open
TeoKisel wants to merge 3 commits into
mate-academy:masterfrom
TeoKisel:master
Open

Create component#4400
TeoKisel wants to merge 3 commits into
mate-academy:masterfrom
TeoKisel:master

Conversation

@TeoKisel

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

Your Sum.jsx component has violations of two explicit checklist requirements that need fixing. First, the paragraph content should use string interpolation (template literals) instead of separate JSX expressions — change {a} + {b} = {a + b} to {Sum of ${a} and ${b} is ${a + b}} [CHECKLIST ITEM #2]. Second, based on the review summary, the Sum components in App.jsx that have fewer than 3 short attributes should be written on a single line to match the code style requirement. Please fix these checklist violations and resubmit.


✨ 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
// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<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 - the checklist requires using string interpolation (template literals) inside tag content, not separate JSX expressions. Change to: {Sum of ${a} and ${b} is ${a + b}}

@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

The Sum component has a critical syntax error that will prevent the code from compiling. In src/components/Sum/Sum.jsx, there's an errant semicolon inside the JSX expression: the template literal is followed by a ; before the closing tag. This should be </p> immediately after the template literal, not };</p>. Additionally, in src/App.jsx, there's a similar issue where a semicolon appears between the JSX expression and the closing paragraph tag. Both of these must be removed for the JSX to parse correctly. Once the syntax errors are fixed, all requirements will be met.


✨ 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
@@ -1,14 +1,14 @@
import React from 'react';
import './App.scss';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Syntax error: There's an errant semicolon between the JSX expression and the closing tag. In JSX, you cannot place a semicolon after {expression}. It should be }</p> not };</p>.

Comment thread src/components/Sum/Sum.jsx Outdated
@@ -1 +1,3 @@
// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<p>{`Sum of ${a} and ${b} is ${a + b}`};</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.

Invalid syntax: There's a semicolon inside the JSX expression which will cause a parsing error. JSX expressions should not contain semicolons. Remove the ; after the template literal.

@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

Educational Approval: This is an approval to support your learning journey. Excellent work! You've successfully implemented all the required functionality — the Sum component correctly handles props with defaults, uses named exports, and renders the proper text format. Your App.jsx includes all five required component instances with the correct props, and the previous syntax errors have been fixed. The demo link is live and working. For future reference, you could use single-line JSX format for components with short attributes (like <Sum a={2} b={3} />) per the style guidelines, but this is a minor suggestion. Keep up the good work, and continue building on this solid foundation!


✨ 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