From 20b3e62b2954ae89a3d301eafa32940ed9da6cf2 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Mon, 24 Aug 2026 17:53:15 +0300 Subject: [PATCH 1/2] Solution --- src/App.jsx | 13 ++++++------- src/components/Sum/Sum.jsx | 7 +++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dc51f769d..708add0a8 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,13 @@ import React from 'react'; import './App.scss'; +import { Sum } from './components/Sum/Sum'; export const App = () => ( <> -

Sum of 2 and 3 is 5

-

Sum of -5 and 5 is 0

-

Sum of 10 and 0 is 10

-

Sum of 0 and 5 is 5

-

Sum of 0 and 0 is 0

- {/* Replace paragraphs with Sum componets */} - {/* And remove commented lines :) */} + + + + + ); diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 381aa0422..df3a6b01f 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1 +1,8 @@ // export const Sum = () => (); +import React from 'react'; + +export const Sum = ({ a = 0, b = 0 }) => ( +

+ Sum of {a} and {b} is {a + b} +

+); From 22b675baea8a10728af5fe653e11521ff5a12b73 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Mon, 24 Aug 2026 18:18:39 +0300 Subject: [PATCH 2/2] Solution --- src/components/Sum/Sum.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index df3a6b01f..092207edb 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -2,7 +2,5 @@ import React from 'react'; export const Sum = ({ a = 0, b = 0 }) => ( -

- Sum of {a} and {b} is {a + b} -

+

{`Sum of ${a} and ${b} is ${a + b}`}

);