DEV Community

Discussion on: What are, Mixins?

Collapse
 
bhagatparwinder profile image
Parwinder 👨🏻‍💻

Hey Jared,

Great question and thanks for reading. Mixins are definitely real. There are times when you’d want to inherit from multiple classes or objects.

That being said there is no official way of implementing Mixins with JS. The lack of true inheritance or composition does lead to myriad of implementation techniques.

Would you ever need it? Maybe not.

Adding object oriented principles to JavaScript might not be fruitful in my opinion but I do bring them up for awareness.

Collapse
 
perpetual_education profile image
perpetual . education

What do you think about 'stamp' ? medium.com/javascript-scene/introd...

Thread Thread
 
bhagatparwinder profile image
Parwinder 👨🏻‍💻

Thanks a ton! As much time as I spend with JavaScript, I am surprised I had not heard of this. That means I have no opinion on it.. yet.

This gives me something new to learn over the next week or two. I appreciate that you brought it up.