Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Support getInitialData from mixins #101

Open
IlyaSemenov opened this issue Jun 19, 2018 · 0 comments
Open

Support getInitialData from mixins #101

IlyaSemenov opened this issue Jun 19, 2018 · 0 comments

Comments

@IlyaSemenov
Copy link
Contributor

It would be great if getInitialData could be pulled from mixins. For now, I have to copy/paste this to every component that needs to reuse getInitialData:

import Mixin from '...'

export default {
  mixins: [ Mixin ],
  getInitialData (context) {
    return Mixin.getInitialData (context)
  }
}

it would be also great if this inside getInitialData pointed to the component for which it is called (not the vm which is non-existent at the moment of that call, but the component options). That would allow to have several components extending a single mixin, and then refer to specific component's options from the common getInitialData coming from a mixin. (Alternatively, component may be added to context).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant