[Feauture Request] Add helper function for composing class mixins #26
Replies: 3 comments
-
I propose using mixin syntax, which it easier to understand and read what's going on. And is similar in syntax of other languages, such as Scala: export class LionFieldset extends mix(LionLitElement).with(
ObserverMixin,
SlotMixin,
CssClassMixin,
EventMixin,
ValidateMixin,
FormControlMixin,
) { An example library is https://github.com/justinfagnani/mixwith.js though it's small enough to implement it custom. It also mimicks a proposal for mixin syntax: https://github.com/justinfagnani/proposal-mixins |
Beta Was this translation helpful? Give feedback.
-
IMO you can just use Justin's mixwith directly. Why do you want to have it in I'm thinking towards closing this as a wontfix, do you have any considerations? cc @daKmoR @tlouisse |
Beta Was this translation helpful? Give feedback.
-
Hi, We are closing this issue because we're changing the way we handle feature requests. Your issue will get the "votes needed" label, and people can add 👍 reactions to vote and show interest. It will be reopened when this feature gets picked up. This we way we clearly focus on bugs in our open issues. At the same time we can see what community interest there is for new features. Thanks! |
Beta Was this translation helpful? Give feedback.
-
This helps when there several mixins applied to a class, i.e. in
LionFieldset.js
Several other helper libraries already expose this functionality, lodash for example. It's basically just a helper for function composition.
Beta Was this translation helpful? Give feedback.
All reactions