filmov
tv
#31 - Mixins - Vue 3 (Options API) Tutorial

Показать описание
In this Vue 3 tutorial, we learn how to create code files that we can use across multiple components. We cover how to create and use mixins, their config object merging priorities and some issues with their usage.
_Note that composables are generally prefered over mixins. We cover composables later on in this tutorial series, when we get to the composition API. This lesson is more for completeness because mixins are useful to know and you may come across them in older projects._
We cover the following topics:
1. What is a mixin
2. How to create a mixin
3. How to use a mixin in a component
4. Configuration option merging priority
5. The problem with mixins
_Note that this tutorial is for the Vue 3 Options API (which is similar to Vue 2). We later move on to the Composition API and then the Script Setup (3.2 update)_
This lesson is also available in written format
Check out the Vue 3 for Beginners playlist for more Vue tutorial videos
Subscribe to the channel and never miss a lesson
Visit the website for a wide range of programming tutorials
_Note that composables are generally prefered over mixins. We cover composables later on in this tutorial series, when we get to the composition API. This lesson is more for completeness because mixins are useful to know and you may come across them in older projects._
We cover the following topics:
1. What is a mixin
2. How to create a mixin
3. How to use a mixin in a component
4. Configuration option merging priority
5. The problem with mixins
_Note that this tutorial is for the Vue 3 Options API (which is similar to Vue 2). We later move on to the Composition API and then the Script Setup (3.2 update)_
This lesson is also available in written format
Check out the Vue 3 for Beginners playlist for more Vue tutorial videos
Subscribe to the channel and never miss a lesson
Visit the website for a wide range of programming tutorials