Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance
Overall
score
99%
{
"context": "This evaluation assesses how well the engineer uses react-addons-shallow-compare to implement a props comparison utility. The focus is on correctly utilizing the package's shallowCompare function and understanding its property enumeration behavior.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import shallowCompare",
"description": "Correctly imports the shallowCompare function from react-addons-shallow-compare package",
"max_score": 20
},
{
"name": "Use shallowCompare",
"description": "Calls shallowCompare with the component instance and nextProps parameters in the correct order: shallowCompare(instance, nextProps, instance.state)",
"max_score": 30
},
{
"name": "Handle props comparison",
"description": "Relies on shallowCompare's built-in logic to compare only enumerable own properties using Object.keys(), without reimplementing property enumeration logic",
"max_score": 25
},
{
"name": "Return correct value",
"description": "Returns the boolean value from shallowCompare directly, which returns true when update is needed (props differ) and false when no update is needed",
"max_score": 25
}
]
}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