DEV Community

loading...

Discussion on: What are, Mixins?

Collapse
elugens profile image
Stacey Wilson

A mixin is a class containing methods that can be used by other classes without a need to inherit from it. In other words, a mixin provides methods that implement a certain behavior, but we do not use it alone, we use it to add the behavior to other classes. It just shows that class based inheritance is not as flexible prototypal inheritance.

Forem Open with the Forem app