Skip to content

Commit

Permalink
Update Vue 3 guide
Browse files Browse the repository at this point in the history
  • Loading branch information
seggewiss committed Feb 7, 2024
1 parent f55f531 commit 6a57f0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/references/upgrades/administration/vue3.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ For your templates to work correctly, perform the following in no specific order

- Replace all `sw-field` usages with the corresponding [components](https://github.com/shopware/shopware/blob/trunk/src/Administration/Resources/app/administration/src/app/component/form/sw-field/index.js#L16).
- [Check all v-models](https://v3-migration.vuejs.org/breaking-changes/v-model.html)
- [Check event listeners](https://v3-migration.vuejs.org/breaking-changes/v-model.html#_3-x-syntax)
- [Check for deprecated slot syntax](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html)
- [Check router-view transition combinations](https://router.vuejs.org/guide/migration/#-router-view-keep-alive-and-transition-)
- [Check your key attributes](https://v3-migration.vuejs.org/breaking-changes/key-attribute.html)
- [Check for filter usages](https://v3-migration.vuejs.org/breaking-changes/filters.html)

### Check your code

Expand Down Expand Up @@ -117,6 +119,10 @@ Fields in the administration no longer have the previous ID almost exclusively u
### Prop default
Prop default functions no longer have access to the component's `this` scope. You can no longer call `this.$tc` in default functions. Use `Shopware.Snippet.tc` instead.

### Mutating props
This is an antipattern also for Vue 2.
In Vue 2 however, those mutations where not always detected. In Vue 3 this will fail with hard errors. Take a look at this [example](https://eslint.vuejs.org/rules/no-mutating-props.html) to get a basic understanding on how to avoid mutating props directly.

## Conclusion

This document emphasizes the crucial need to upgrade your Shopware extensions to Vue.js 3 as Vue.js 2 reaches its end of life on December 31st 2023. Here's a concise recap of the key points:
Expand Down

0 comments on commit 6a57f0c

Please sign in to comment.