-
Notifications
You must be signed in to change notification settings - Fork 3.9k
add task solution #4285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add task solution #4285
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| import React from 'react'; | ||
| import './App.scss'; | ||
| import { Sum } from './components/Sum/Sum'; | ||
|
|
||
| export const App = () => ( | ||
| <> | ||
| <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> | ||
| {/* Replace paragraphs with Sum componets */} | ||
| {/* And remove commented lines :) */} | ||
| <Sum a={2} b={3} /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates checklist item #2: When a tag has fewer than 3 attributes and short values, write it in one line. Change to |
||
| <Sum a={-5} b={5} /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates checklist item #2: When a tag has fewer than 3 attributes and short values, write it in one line. Change to |
||
| <Sum a={10} /> | ||
| <Sum b={5} /> | ||
| <Sum /> | ||
| </> | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| // export const Sum = () => (); | ||
| export const Sum = ({ a = 0, b = 0 }) => ( | ||
| <p> | ||
| Sum of {a} and {b} is {a + b} | ||
|
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates checklist item #2: use string interpolation inside tag content. The content mixes plain text with JSX expressions |
||
| </p> | ||
| ); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #3: Use template literal string interpolation inside the tag content. Change to
{Sum of ${a} and ${b} is ${a + b}}