Skip to content

Commit

Permalink
chore: remove no longer present V_FOR_REF compat entry
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 31, 2022
1 parent 1070f12 commit 245230e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/vue-compat/README.md
Expand Up @@ -308,7 +308,6 @@ Features that start with `COMPILER_` are compiler-specific: if you are using the
| OPTIONS_BEFORE_DESTROY || `beforeDestroy` -> `beforeUnmount` | |
| OPTIONS_DESTROYED || `destroyed` -> `unmounted` | |
| WATCH_ARRAY || watching an array no longer triggers on mutation unless deep | [link](https://v3-migration.vuejs.org/breaking-changes/watch.html) |
| V_FOR_REF || `ref` inside `v-for` no longer registers array of refs | [link](https://v3-migration.vuejs.org/breaking-changes/array-refs.html) |
| V_ON_KEYCODE_MODIFIER || `v-on` no longer supports keyCode modifiers | [link](https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html) |
| CUSTOM_DIR || Custom directive hook names changed | [link](https://v3-migration.vuejs.org/breaking-changes/custom-directives.html) |
| ATTR_FALSE_VALUE || No longer removes attribute if binding value is boolean `false` | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) |
Expand Down

2 comments on commit 245230e

@diegofer25
Copy link

@diegofer25 diegofer25 commented on 245230e Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, i can reproduce it on SFC playground but in my dev env the array of refs is not populating (vue version: 3.2.31)

<template>
  <div>
    <ul>
      <li ref="itemsRef" :key="index" v-for="(item, index) of items">
        {{ item }}
      </li>
    </ul>
    {{ itemsRef }}
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';

export default defineComponent({
  setup() {
    const items = ref<string[]>(['one', 'two', 'three']);
    const itemsRef = ref<Element[]>([]);

    setInterval(() => {
      items.value.push('new item');
      console.log(itemsRef.value);
    }, 5000);

    return {
      items,
      itemsRef,
    };
  },
});
</script>

@edison1105
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diegofer25
because there is a bug. #5525

Please sign in to comment.