diff --git a/src/guide/mixins.md b/src/guide/mixins.md index 7776858a59..b5c89f7fd2 100644 --- a/src/guide/mixins.md +++ b/src/guide/mixins.md @@ -2,7 +2,7 @@ ## Basics -Mixins are a flexible way to distribute reusable functionalities for Vue components. A mixin object can contain any component options. When a component uses a mixin, all options in the mixin will be "mixed" into the component's own options. +Mixins distribute reusable functionalities for Vue components. A mixin object can contain any component options. When a component uses a mixin, all options in the mixin will be "mixed" into the component's own options. Example: @@ -213,6 +213,8 @@ app.mixin({ }) ``` +## Precautions + In Vue 2, mixins were the primary tool to abstract parts of component logic into reusable chunks. However, they have a few issues: - Mixins are conflict-prone: Since properties from each feature are merged into the same component, you still have to know about every other feature to avoid property name conflicts and for debugging.