VueJS: Mixins

Paulund is full of premium tutorials and support to help with your development

Sign up to get full access to all tutorials.

Get Started

Login to your account

Mixins are a way of reusing functionality from within your Vue Components. A mixing will use the same properties as a component such as created, methods and when a component uses this mixin the functions will be merged into the component. If you're coming from a PHP background you can think of mixins as a similar functionality to traits. To show an example of the mixin functionality, we'll create a mixin which will have a message data point, then create 2 components that will reuse this functionality and display the mixin message in different ways. First lets create . . .

Get Started