CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-hoist-non-react-statics

Copies non-react specific statics from a child component to a parent component

95

1.09x
Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "Evaluates whether the solution uses hoist-non-react-statics correctly to copy metadata from real React components while deliberately avoiding hoisting when given intrinsic string tags. Scoring emphasizes correct import and invocation patterns that rely on the library's built-in safeguards.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Use library hoist",
      "description": "Wrapper calls hoistNonReactStatics(target, baseComponent) for non-string components instead of manually copying statics.",
      "max_score": 35
    },
    {
      "name": "Skip DOM strings",
      "description": "Implements a guard (e.g., typeof baseComponent === \"string\") or otherwise ensures hoistNonReactStatics is not invoked for intrinsic tags like \"div\"/\"button\", leaving wrapper statics unchanged for those inputs.",
      "max_score": 30
    },
    {
      "name": "Respect blacklist",
      "description": "Relies on hoistNonReactStatics default React/static exclusions (propTypes, defaultProps, displayName, etc.) without overriding them to force copying reserved statics.",
      "max_score": 15
    },
    {
      "name": "Return hoisted target",
      "description": "Returns or reuses the value from hoistNonReactStatics so the wrapped component retains the hoisted statics for downstream chaining.",
      "max_score": 10
    },
    {
      "name": "Correct import",
      "description": "Imports hoistNonReactStatics from the hoist-non-react-statics package using the documented default export with no unused or incorrect dependency wiring.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-hoist-non-react-statics

tile.json