# Extendable Mixins

**URL:** <https://discuss.emberjs.com/t/extendable-mixins/2012>\
**Category:** Design\
**Created:** [August 1, 2013, 9:23pm UTC](https://discuss.emberjs.com/t/extendable-mixins/2012 "2013-08-01T21:23:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingpin2k](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kingpin2k/32/4255_2.png) [@kingpin2k](https://discuss.emberjs.com/u/kingpin2k)\
**Post date:** [August 1, 2013, 9:23pm UTC](https://discuss.emberjs.com/t/extendable-mixins/2012/1 "2013-08-01T21:23:03Z")

</div>

I’m finding myself building more and more mixins the more I use ember. A problem I’m finding though, is I often am writing code that feels like a reusable mixin that’d be awesome to extend on multiple mixins. I have some functionality that I’d like to extend out of two mixins and put in another mixin, but it doesn’t really seem possible. I found I could partially cheat and reopen the class, but that isn’t really working how I wanted it to.

I really want to do

```
Ember.Mixin.create(someOtherMixin, someOtherMixin2{ yadda yadda yadda});

```

or even

```
Ember.Mixin.extend(someOtherMixin, someOtherMixin2{ yadda yadda yadda});

```

How have other people generated reusable code that’s shareable across multiple portions of your ember app?

---

<div class="post-metadata">

**Author:** ![seilund](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/seilund/32/14351_2.png) [@seilund](https://discuss.emberjs.com/u/seilund)\
**Post date:** [August 1, 2013, 11:47pm UTC](https://discuss.emberjs.com/t/extendable-mixins/2012/2 "2013-08-01T23:47:11Z")

</div>

This actually works:

```javascript
Ember.Mixin.create(App.OtherMixin, {...})

```

See this example: [http://jsbin.com/akefoz/1/edit](http://jsbin.com/akefoz/1/edit)

---

<div class="post-metadata">

**Author:** ![kingpin2k](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kingpin2k/32/4255_2.png) [@kingpin2k](https://discuss.emberjs.com/u/kingpin2k)\
**Post date:** [August 2, 2013, 4:37am UTC](https://discuss.emberjs.com/t/extendable-mixins/2012/3 "2013-08-02T04:37:30Z")

</div>

Well hell, I swore I tried that. I feel sheepish.

To feel a little better about myself, I realize it was actually the order my js files were being sent down. they were being initialized in the wrong order and dying.

See your same example broken [http://jsbin.com/akefoz/6/edit](http://jsbin.com/akefoz/6/edit)
