Question from the React ⚛️ test

Write a React component that renders a list of numbers

Medium

What will this component display?

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

const MyComponent=()=>{
    const ComponentB=<ComponentA value={1}/>
    return(
       <>
           <ComponentA value={- 1}/>
           <ComponentB/>
       </>
    );
};
Author: EnguerranStatus: Published(Update)Question passed 515 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!