CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-react-addons-shallow-compare

Legacy React addon for performing shallow comparison of props and state to optimize component rendering performance

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "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-compare

tile.json