Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup] Refactor interesting functions away from mixins #1625

Closed
mike-north opened this issue Jul 10, 2018 · 1 comment
Closed

[Cleanup] Refactor interesting functions away from mixins #1625

mike-north opened this issue Jul 10, 2018 · 1 comment

Comments

@mike-north
Copy link
Collaborator

Currently there are places where functions live on mixins for little or no reason (there may have been very good reasons before, but no longer).

While leaving the public API surface intact, we should refactor these out so that they may be consumed directly

Example

Before:
export default Mixin.extend({
  add(x) {
    return this.get('total') + x;
  }
});
After:
export function add(obj, x) {
  return obj.get('total') + x;
}

export default Mixin.extend({
  add(x) {
    return add(this, x);
  }
});
@marcoow
Copy link
Member

marcoow commented Jun 5, 2020

mixins are deprecated now – see #2198

@marcoow marcoow closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants