Copies non-react specific statics from a child component to a parent component
95
A utility that wraps a React component while mirroring its custom static properties to the wrapper, allowing callers to block selected statics through an exclusion map. The exclusion map uses string or symbol keys set to truthy values to indicate which statics should be skipped while copying all others.
role, version) and the exclusion map flags role, the wrapped component exposes version but not role. @test@generates
export function wrapWithStaticControl(targetComponent, sourceComponent, exclusionMap?: Record<string | symbol, boolean>): typeof targetComponent;Hoists custom static properties between components while honoring React-reserved keys and caller-specified exclusion maps.
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