commit
f642b650d3
1 changed files with 2 additions and 2 deletions
|
@ -203,6 +203,6 @@ And `eventMixin` mixin makes it easy to add such behavior to as many classes as
|
||||||
|
|
||||||
Some other languages allow multiple inheritance. JavaScript does not support multiple inheritance, but mixins can be implemented by copying methods into prototype.
|
Some other languages allow multiple inheritance. JavaScript does not support multiple inheritance, but mixins can be implemented by copying methods into prototype.
|
||||||
|
|
||||||
We can use mixins as a way to augment a class by multiple behaviors, like event-handling as we have seen above.
|
We can use mixins as a way to augment a class by adding multiple behaviors, like event-handling as we have seen above.
|
||||||
|
|
||||||
Mixins may become a point of conflict if they accidentally overwrite existing class methods. So generally one should think well about the naming methods of a mixin, to minimize the probability of that.
|
Mixins may become a point of conflict if they accidentally overwrite existing class methods. So generally one should think well about the naming methods of a mixin, to minimize the probability of that happening.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue