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-4/

{
  "context": "Evaluates how well the solution uses hoist-non-react-statics to merge component statics while keeping the target's React-reserved metadata intact. Checks focus on invoking the library instead of manual copying and confirming the expected statics and return value are produced.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Library call",
      "description": "`hoistNonReactStatics(targetComponent, sourceComponent)` is used to copy statics rather than manual Object.assign logic.",
      "max_score": 40
    },
    {
      "name": "React statics preserved",
      "description": "Target React-reserved statics such as `displayName`, `defaultProps`, and `propTypes` remain the target's values after hoisting because `hoistNonReactStatics` is applied in the correct order (target first, source second).",
      "max_score": 30
    },
    {
      "name": "Custom statics hoisted",
      "description": "Custom non-React statics from the source (including symbol statics like a `version` or metadata flag) appear on the target as a result of the `hoistNonReactStatics` call.",
      "max_score": 20
    },
    {
      "name": "Returns target",
      "description": "Wrapper returns the same target component reference (the return value from `hoistNonReactStatics`) to support chaining.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json