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

task.mdevals/scenario-5/

Symbol Static Preserver

Wrap a renderable component while preserving symbol-keyed static metadata.

Capabilities

Render passthrough

  • The wrapper renders the provided component with all props forwarded unchanged. @test

Hoists symbol statics

  • A symbol-keyed static value on the base component is accessible on the wrapped component with the same reference. @test

Excludes selected symbols

  • When options.excludeSymbols includes a symbol present on the base component, that symbol static is not attached to the wrapped component. @test

Hoists inherited symbols

  • Symbol-keyed statics defined on a parent class of the base component are available on the wrapped component. @test

Implementation

@generates

API

/**
 * Creates a wrapper that renders the provided component and preserves symbol-keyed static metadata.
 * @param {React.ComponentType<any>} component - Component to wrap.
 * @param {{ excludeSymbols?: Symbol[] }} [options] - Symbols that should not be copied to the wrapper.
 * @returns {React.ComponentType<any>} Wrapped component that proxies render.
 */
export default function createInstrumentedComponent(component, options);

Dependencies { .dependencies }

react { .dependency }

Provides component primitives for rendering and element creation.

hoist-non-react-statics { .dependency }

Copies non-React static properties, including symbol-keyed metadata, from one component to another.

Install with Tessl CLI

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

tile.json