:key
shorthand incorrectly compiles to UNKEYED_FRAGMENT
#10882
Closed
Description
Vue version
3.4.27
Link to minimal reproduction
Steps to reproduce
In minimal reproduction, see playground compiled JS.
What is expected?
:key
should compile to the same output as :key="key"
.
What is actually happening?
:key
compiles to UNKEYED_FRAGMENT
, whereas :key="key"
compiles to KEYED_FRAGMENT
.
System Info
No response
Any additional comments?
Here is a practical example in playground of how this bug can affect behavior by causing stateful tags and components to be rebuilt and thus losing state.