Skip to content

solution#3

Closed
shortSparrow wants to merge 2 commits into
mate-academy:masterfrom
shortSparrow:develop
Closed

solution#3
shortSparrow wants to merge 2 commits into
mate-academy:masterfrom
shortSparrow:develop

Conversation

@shortSparrow
Copy link
Copy Markdown

Comment thread src/App.js Outdated
<h1>React sum</h1>
<div>
<h1>React sum</h1>
<Sum expression={[[2, 2], [10, 0], [-5, 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.

Твой компонент должен принимать два пропса - a и b

Comment thread src/components/Sum.js
import React from 'react';
import PropTypes from 'prop-types';

function Sum(props) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

так коротше і суть та сама

const Sum = ({ a, b }) => <p>{...}</p>

Y-Kotvitskiy pushed a commit to Y-Kotvitskiy/react_sum that referenced this pull request Apr 4, 2025
Y-Kotvitskiy pushed a commit to Y-Kotvitskiy/react_sum that referenced this pull request Apr 4, 2025
This was referenced Aug 31, 2025
MiltonMario added a commit to MiltonMario/react_sum that referenced this pull request Nov 6, 2025
BohdanPanchyshyn added a commit to BohdanPanchyshyn/react_sum that referenced this pull request Nov 19, 2025
This was referenced May 21, 2026
This pull request was closed.
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.

3 participants