Views: 2235
Last Modified: 27.04.2022
  • attribute use :key

    It's no longer required to indicate a key for instructions v-if/v-else/v-else-if – Vue does it automatically.

    You won't be able to indicate keys manually, but each key must have a unique name.

    When using the tag <template> with iterator v-for, the key must be located on this tag instead of its children, as before.


    <template v-for="item in list">
      <div :key="'heading-' +">...</div>
      <span :key="'content-' +">...</span>


    <template v-for="item in list" :key="">

    You can read more about such this update in the migration guide.

  • using instruction v-if jointly with v-for

    Now v-if has the priority when using v-if jointly with v-for at a single element.

  • using instruction v-model

    If you have used the instruction v-model, you must read the article about the key changes in the migration guide.

Courses developed by Bitrix24