Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance
99
Pending
Does it follow best practices?
Impact
99%
1.03xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses react-addons-shallow-compare to implement a React component that properly distinguishes between positive and negative zero values. The focus is on correct usage of the shallowCompare function within shouldComponentUpdate to enable the component to detect sign changes in zero values.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import shallowCompare",
"description": "The solution correctly imports the shallowCompare function from react-addons-shallow-compare package",
"max_score": 15
},
{
"name": "shouldComponentUpdate implementation",
"description": "The component implements the shouldComponentUpdate lifecycle method to control rendering behavior",
"max_score": 20
},
{
"name": "shallowCompare usage",
"description": "The shouldComponentUpdate method calls shallowCompare with the correct three arguments: (this, nextProps, nextState)",
"max_score": 25
},
{
"name": "Return value handling",
"description": "The shouldComponentUpdate method returns the boolean value returned by shallowCompare without modification",
"max_score": 20
},
{
"name": "Zero sign detection",
"description": "The component correctly distinguishes between +0 and -0 in the render output by using Object.is or 1/value to determine the sign",
"max_score": 20
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10