You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do you think of a "mixed in" callback for mixins which is called at the moment of applying a mixin to a component with component's spec as an argument?
var SomeTrickeryMixin = {
mixin: function(spec) {
// redefine .render() or do some other dangerous things
},
...
};
Besides overriding .render() such callbacks can be used when you want to implement a "custom policy" for some methods (wrap method, call-before, call-after, ...).
As a downside that would make things a little less straightforward from a (mixin) user perspective.
The text was updated successfully, but these errors were encountered:
Magically overriding render seems like a bad idea, it seems to me like it would be better for the Mixin to explicitly state that it implements the render method and that you should instead implement renderBecauseOfMixin. Also, I'm assuming it wouldn't fly with ES6-classes when they come around?
As per #1305 (comment), mixins are a legacy feature and we're not really adding things to them at this point. This issue has been untouched for over a year, closing due to inactivity.
What do you think of a "mixed in" callback for mixins which is called at the moment of applying a mixin to a component with component's spec as an argument?
Besides overriding
.render()
such callbacks can be used when you want to implement a "custom policy" for some methods (wrap method, call-before, call-after, ...).As a downside that would make things a little less straightforward from a (mixin) user perspective.
The text was updated successfully, but these errors were encountered: