1a5d84cb58a45bf1223c8ff56d9846254077039d
Root cause: the React DevTools browser extension injects a hook stub at document_start (before HTML parsing), so hook.inject can be undefined when React Fast Refresh runs. React Refresh destructures inject as undefined and later calls undefined.apply() -> TypeError. This prevents React from ever setting injectedHook, so onCommitFiberRoot is never called. Fix: unconditionally replace hook.inject with a wrapper that tries the captured previous inject (with try/catch) then falls back to our own renderer ID allocation. Works regardless of script execution order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Languages
TypeScript
82.8%
PHP
10.2%
CSS
6.2%
HTML
0.4%
Shell
0.4%