Mixins in JavaScript | Developer Quick Takes
Вставка
- Опубліковано 20 лип 2024
- Mixins allow you to dynamically use methods from another class without inheriting it, maintaining classes decoupled. Learn more about mixins in this new quick take from Alba Rivas.
Connect with Salesforce Developers:
Website: developer.salesforce.com/
Facebook: / salesforcedevs
Twitter: / salesforcedevs
LinkedIn: / salesforce-developers - Наука та технологія
Take a look at an example of a custom LWC mixin --> github.com/albarivas/lwc-mixin-example
It's easier when you explain it, Thanks Alba!
Thank you Alba for this. Really nice explanation of the different possibilities and use cases of mixins
Great Explanation. It's give us a brief knowledge about mixing in js and how we can use.
Alba is the best! 👏
Thank you so much for your explanation, cheers from Argentina
Great video. Thanks Alba.
Great video Alba, nice one!
great video, explained wonderfully, thanks!
I fail to understand how can this code be considered decoupled when there is use of extends? in class extends SuperClass snippet an inheritance relationship is already established isn't it?
Isnt this a more complex way to eventually create an inheritance chain, without explicitly stating so? Are there any benefits to this other than cleaner code?
I was asking myself the same
5 minutes very well spent, all I can say!
Great Video!!
Does that mean we can extend other components as well other than NavigationMixin with lightning element?
🤔🤔
you should be able to but I haven't tried
Tried, and it works --> github.com/albarivas/lwc-mixin-example
Bem crazy
it's misleading