React Daily: Constructor Invocation Fix for ES6 Compatibility
A critical fix was merged to address TypeError issues when invoking class constructors without the 'new' keyword in JavaScript runtimes that don't support Reflect APIs, particularly affecting Hermes runtime.
Duration: PT1M40S
Episode overview
This episode is a short developer briefing from React Daily.
It explains recent repository work in plain language.
- Show: React Daily
- Published: 2026-05-14T10:00:56Z
- Audio duration: PT1M40S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good morning, this is React Daily for May 14th, 2026.
Ruslan Lesiutin merged a fix for class component frame description that resolves constructor invocation issues in ES6 environments. The pull request addresses a TypeError that occurs when JavaScript runtimes without Reflect API support attempt to call class constructors without the 'new' keyword.
The problem was discovered in Hermes runtime, though it affects any JavaScript engine lacking Reflect implementation. Previously, React's fallback code used `fn.apply(Fake.prototype)` to invoke constructors, which violates ES6 requirements that mandate using the 'new' keyword for class constructors.
The solution replaces the incorrect invocation with a proper `new fn()` call, using a temporarily patched class prototype that traps the setter for the props object. This approach mirrors the existing strategy used when Reflect APIs are available, maintaining consistency across different runtime environments.
The fix spans four files, adding 105 lines and removing 16, with comprehensive test coverage to prevent regression. The changes are contained within React's component stack frame handling and development tools integration.
What's next:…
Nearby episodes from React Daily
- Weekly Recap - Rust Compiler Maturity Push
- Rust Compiler TypeScript Support
- Weekly Recap - Server Components & Runtime Compatibility
- FormData Bug Fix and ViewTransition Tests
- Stylesheet Preloading Fix
- Server Functions Security and Performance Update
- Weekly Recap - DevTools Enhancements & Meta Infrastructure
- DevTools UX Improvements