template ref with reactive in v-for always empty in production mode
Filin3 opened this issue · comments
Philip Gromov commented
Vue version
3.4.21
Link to minimal reproduction
Steps to reproduce
Open vue playground then open devtools console and change prod\dev mode
What is expected?
The same behavior is expected in prod and dev mode. Reactive const will be filled in both cases
What is actually happening?
The Reactive constant is filled in dev mode, but always empty in prod
System Info
No response
Any additional comments?
No response
Thorsten LĂĽnborg commented
The production behaviour is correct as the template ref gets a new array reassigned - and const variables are not re-assignable.
However we should look into how to warn about this in dev mode