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
Thanks. This isn't a bug per-se, we intentionally limited the optimization to function expressions and not object methods. But it is likely safe to extend the optimization. Note that this is unrelated to #31180
josephsavona
changed the title
[Compiler Bug]: Shorthand methods not hoisted out of component
[Compiler]: Extend Function outlining to object methods
Jan 10, 2025
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAgHgBwjALgAgDMoA7OXASwhPyjAQBUALCkgcwAoBKfYAHRq16AZQgBbBAAkIEANYd+g-Pgm4mEACYBGbrwHKD+GAlywahAIYAbegG59BgL4AaB8tXqNAJmT5dAXgA+PSUDY1MYc2s7N3wXWI9NAGZfYjJKaj8eRUNlcLMiaIR7UPjQxI0AFlTScioaCsqskNyjEwLLG2LYsuVHLhLHEEcgA
Repro steps
is not hoisted, while
is correctly hoisted.
Seems to be related to the fact the function is named?
This may or may not be the same as #31180?
How often does this bug happen?
Every time
What version of React are you using?
N/A
What version of React Compiler are you using?
19.0.0-beta-63e3235-20250105
The text was updated successfully, but these errors were encountered: