Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance
Overall
score
99%
Build a React class component that displays a list of products with optimized rendering to prevent unnecessary re-renders when parent components update but product data hasn't changed.
Create a ProductList class component that:
products prop - an array of product objects, where each product has id, name, and price propertiescurrency prop - a string representing the currency symbol (e.g., "$", "€")The component should re-render only when:
The component should NOT re-render when:
@generates
import React from 'react';
/**
* A product list component with optimized rendering
*/
class ProductList extends React.Component {
render() {
// IMPLEMENTATION HERE
}
}
export default ProductList;Provides React component functionality.
Provides shallow comparison support for render optimization.
Install with Tessl CLI
npx tessl i tessl/npm-react-addons-shallow-comparedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10