Question from the React ⚛️ test

Write a React component that renders a list of numbers

Archived

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: Vincent CotroStatus: Archived(New question!)Question passed 859 times
1
Community EvaluationsNo one has reviewed this question yet, be the first!