Question from the React ⚛️ test

Write a React component that displays the sum of two numbers

Easy

What will this component display?

const ComponentA=({value})=><div>{value + 1}</div>;
const ComponentB=({value})=><div>{value - 1}</div>;

const MyComponent=()=>(
   <>
       <ComponentA value={-1}/>
       <ComponentB value={1}/>
   </>
);
Author: Vincent CotroStatus: PublishedQuestion passed 2978 times
Edit
8
Community EvaluationsNo one has reviewed this question yet, be the first!