Preparing for system design interviews?  Try bugzed.com →

Hoist Non-React Statics

JSON →
library 3.3.2 ·javascript
verified Jun 17, 2026

hoist-non-react-statics is a focused utility library for React applications designed to copy non-React specific static properties from a child component to a parent component. It functions similarly to `Object.assign` but intelligently blacklists React's internal static keywords to prevent unintentional overrides. This mechanism is critical for Higher-Order Components (HOCs) to correctly preserve static methods, `propTypes`, `defaultProps`, or other custom static properties from the wrapped component, preventing their loss during composition. The current stable version is 3.3.2. The package maintains a stable release cadence primarily driven by React's evolution (e.g., ForwardRefs support) and TypeScript definition enhancements, ensuring broad compatibility across various React versions. Its key differentiator is its precise targeting of user-defined static properties while respecting React's internals, solving a common HOC pattern challenge documented by React itself.

total hits 14
actors 4 distinct systems
last hit 16d ago AhrefsBot
GPTBot
4
Script
1
Search engines
1
Humans
4

top countries 🇺🇸 United States · 🇨🇦 Canada · VN · 🇬🇧 United Kingdom · SA