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 1405 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
7
Improve this React component so that it displays "Green" by default.6
Write a React function that fetches comments and passes them to a component.5
How to submit a form in React6
Optimize a React component by implementing shouldComponentUpdate3
Fix the following React component: Scroller2
Write the missing code to render the children of the UserProfile component.2
Write a React component as a function