Copies non-react specific statics from a child component to a parent component
95
{
"context": "Evaluates whether the solution leverages hoist-non-react-statics to wrap React.forwardRef components so custom statics move to the wrapper while forwardRef internals stay untouched. Emphasizes correct hoistNonReactStatics usage over manual copying or reimplementation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Hoist call",
"description": "Uses hoistNonReactStatics from hoist-non-react-statics to copy statics from the forwardRef source onto the wrapper, with the wrapper passed as target and the source as source.",
"max_score": 30
},
{
"name": "Skip internals",
"description": "Relies on hoistNonReactStatics forwardRef handling so $$typeof, render, defaultProps, displayName, and propTypes from the source are not hoisted or overwrite wrapper values.",
"max_score": 25
},
{
"name": "Custom statics",
"description": "Shows that custom statics (including symbol-keyed metadata) defined on the forwardRef source appear on the wrapper because of hoistNonReactStatics rather than manual redefinition.",
"max_score": 20
},
{
"name": "Hoist placement",
"description": "Invokes hoistNonReactStatics after the wrapper forwardRef component is created and returns that hoisted wrapper so copied statics attach to the exported component.",
"max_score": 15
},
{
"name": "No manual copies",
"description": "Avoids manual assignment of React-reserved forwardRef statics, depending on hoistNonReactStatics to manage exclusions instead of copying filtered properties by hand.",
"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