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
We report a false positive for the combination of a ref-accessing function placed inside an array which is they type-cast. Here we teach ref validation about type casts. I also tried other variants like `return ref as const` but those already worked.
Closesfacebook#31864
We report a false positive for the combination of a ref-accessing
function placed inside an array which is they type-cast. Here we teach
ref validation about type casts. I also tried other variants like
`return ref as const` but those already worked.
Closes#31864
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEwBUYCAwgIYA21ARpXANYA0JZASggGZukIBlPJTwICAXwLcYEDAQA6IGAkZ5FAbnkA7bQgAeOfFKha4eNBC3tBaAF4IAFAEoi2ggTiWwhANoATTAQtMAtgtjI8ABFA4NCwAF0CAF5rIRFHYDd3AgB3ND88AAtkAgAGFiz3QoQ0AHNCvBLyrPEnTR0rDy9CLGUANwtSAHk6Mhg+hBhk6y5uZ3asz2DCOFI8WVnp-ipaBmYHBy0IPwQXJIA+V073NG4CB16EAegwEbGJmAA6VZhlLTwXJlrtlHs9hqNJh9vrA-nhPgEwEstAgzPNKiD+oNXhDxpNob8goQUiYTtw0Mi-O1shJtOjbvcjicAPyfRkIAAqAE8sGIknyCAA5Y4IT4AUQAMqKALKigXsgD6AqGkVFgPR7iW3gIEBxH2myJyBC4IXsb0hkwOPkJME58TOlyB1Op9Ic1s5BAAZB6CG7PnRcCcYAAhCB6AR2U5XJ1OzWEYjk6jkmz2Ep5AqFNh0agQZjhlMEap1BoSZLq6M+-42v0ByYhsMRnyleILYHRiLRDBBEJeBzENNFNiF+qEVpU8viMuj2mt7W6vE696ONltMugrFm3FfH6w6YL80wMfuCedcRsHx2lvuZR4WBWHyrbwbHhsAKd2JeZvaY8gcRAA
Repro steps
as const
to the end of the line returning[customRef, dimensions]
.Ref values (the
currentproperty) may not be accessed during render.
How often does this bug happen?
Every time
What version of React are you using?
18.2.0
What version of React Compiler are you using?
19.0.0-beta-201e55d-20241215
The text was updated successfully, but these errors were encountered: