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 copy eligible statics while respecting React.memo internals across React 16.11+ shapes. Scoring focuses solely on correct, intentional use of the library's API to preserve wrapper metadata, skip memo internals, and hoist both string and symbol statics.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Library call",
"description": "Imports and invokes hoistNonReactStatics from hoist-non-react-statics to hoist statics instead of manually copying properties.",
"max_score": 30
},
{
"name": "Memo awareness",
"description": "Relies on hoistNonReactStatics' built-in memo detection (via react-is) so memo internals (e.g., $$typeof, compare, type, defaultProps, displayName, propTypes) are excluded for both 16.11 and 16.12+ memo shapes.",
"max_score": 25
},
{
"name": "Preserves wrapper",
"description": "Orders hoistNonReactStatics so existing wrapper metadata (displayName, propTypes, defaultProps) remain intact and are not overwritten during hoisting.",
"max_score": 15
},
{
"name": "Symbol statics",
"description": "Uses hoistNonReactStatics in a way that copies symbol-named statics from memo sources without stripping or ignoring symbol keys.",
"max_score": 15
},
{
"name": "Exclusion map",
"description": "Passes through the optional exclusion map argument to hoistNonReactStatics so user-specified statics can be skipped during hoisting when requested.",
"max_score": 15
}
]
}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