Create a Sum
component accepting a
and b
props and rendering a paragraph with a text like Sum of 2 and 1 is 3
. Replace numbers with actual
values. If the a
or b
props are not passed, set them to 0
.
Please note: use named export (not default).
The App
should contain the next Sum
components:
a = 2
andb = 3
;a = -5
andb = 5
;- just
a = 10
; - just
b = 5
; - no params at all.
- Implement a solution following the React task guideline.
- Open one more terminal and run tests with
npm test
to ensure your solution is correct. - Replace
<your_account>
with your Github username in the DEMO LINK and add it to the PR description.