Mixins historically fulfilled a lot of different roles in Ember apps, so the right pattern to migrate to depends on what exactly the mixin did! In general, you'll find that you end up with one of the following:
- A service, injected into the class which the mixin was mixed into
- A standalone native class, set as a property on the class which the mixin was mixed into
- One or more functions, both in JavaScript and as template helpers
- A manager-style
yield
-only component
👩🍳 Recipes
Mixin With Observers Triggering Actions