In an ES6 class with some instance variables and methods, how can you add a mixin to it? I\'ve given an example below, though I don\'t know if the syntax for the mixin objec
You should probably look at Object.assign(). Gotta look something like this:
Object.assign()
Object.assign(Test.prototype, mixin);
This will make sure all methods and properties from mixin will be copied into Test constructor's prototype object.
mixin
Test