You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Compiler silently skips components it can't compile, which is intentional (panicThreshold: 'none'). But the docs don't say which patterns trigger a skip, so developers can't tell when a component isn't being optimized.
A write up reports that these patterns inside try/catch prevent compilation:
conditionals (if/else)
ternaries, optional chaining and ??
throw
The compiler's own error confirms at least one of these: Todo: Support value blocks (conditional, logical, optional chaining, etc) within a try/catch statement.
These are common in async code (fetch, then check response.ok), so developers may be affected without knowing.
Request:
Add a list of currently unsupported syntax patterns
Activity