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

{
  "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-statics

tile.json