Skip to content

fix: explicitly warn for infinite loops discovered only via enableInfiniteRenderLoopDetection#36195

Open
hoxyq wants to merge 1 commit intomainfrom
infinite-render-loop/warn-fix
Open

fix: explicitly warn for infinite loops discovered only via enableInfiniteRenderLoopDetection#36195
hoxyq wants to merge 1 commit intomainfrom
infinite-render-loop/warn-fix

Conversation

@hoxyq
Copy link
Copy Markdown
Contributor

@hoxyq hoxyq commented Apr 2, 2026

My change in #35999 did not cover all possible scenarios for emitting a warning, instead of throwing.

The instrumentation not only enables the identification for the infinite loop via execution context checks, but also adds the check to more lifecycle methods, like markRootPinged and markRootUpdated.

@hoxyq hoxyq requested review from jackpope and rickhanlonii April 2, 2026 13:00
@meta-cla meta-cla bot added the CLA Signed label Apr 2, 2026
@react-sizebot
Copy link
Copy Markdown

Comparing: 80b1cab...8d8ef64

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 612.91 kB 612.91 kB = 108.30 kB 108.30 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 678.85 kB 678.85 kB = 119.27 kB 119.27 kB
facebook-www/ReactDOM-prod.classic.js +0.02% 698.24 kB 698.38 kB +0.02% 122.65 kB 122.68 kB
facebook-www/ReactDOM-prod.modern.js +0.02% 688.55 kB 688.69 kB +0.03% 121.03 kB 121.06 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 8d8ef64

@rickhanlonii
Copy link
Copy Markdown
Member

I need some tests to understand what wasn't covered before and what's covered now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants