Question from the React (legacy) test

Optimize the display of a React component.

Hard

We want to optimize the display of this component.

function Product(props){
    return(
       <div className="productBlock">
           <h3>{props.name}</h3>
           <p>{props.description}</p>
           <p>by{props.brand}</p>
       </div>
    );
}

Product.propTypes={
    name: PropTypes.string.isRequired,
    description: PropTypes.string.isRequired,
    brand: PropTypes.string.isRequired,
};

Check the valid optimization(s):

Author: Victor SabatierStatus: PublishedQuestion passed 1387 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!