jayphelps / core-decorators

Library of stage-0 JavaScript decorators (aka ES2016/ES7 decorators but not accurate) inspired by languages that come with built-ins like @​override, @​deprecate, @​autobind, @​mixin and more. Popular with React/Angular, but is framework agnostic.
MIT License
4.52k stars 263 forks source link

Why is mixin deprecated? #145

Closed AjaxSolutions closed 6 years ago

AjaxSolutions commented 6 years ago

I wish there was brief note explaining why the mixin decorator was deprecated.

jayphelps commented 6 years ago

Sorry for the confusion and not making it clearer! I added an explanation in the deprecation message @mixin is deprecated and will be removed shortly. Use @mixin from lodash-decorators. and there's a blurb in the README but that indeed isn't super clear since it doesn't specifically say it's about the deprecated ones.

https://www.npmjs.com/package/lodash-decorators#mixin

I'll see if I can come up with a better disclaimer in the README. Thanks for letting me know!

tombh commented 6 years ago

I was curious about this too, so I searched "mixin" in the issues here to get the context. I'm thinking about using this lib so I've never seen that warning message. So yeah a note in the README about preferring lodash's decorator would be useful.