Copies non-react specific statics from a child component to a parent component
95
{
"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-staticsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10