Skip to content

Instantly share code, notes, and snippets.

@neodigm
Last active September 6, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neodigm/6c70047af8734667e8cf176b81c12377 to your computer and use it in GitHub Desktop.
Save neodigm/6c70047af8734667e8cf176b81c12377 to your computer and use it in GitHub Desktop.
Vuejs Provide Inject Reactive Component Communication
//. Parent Component
provide() {
return {
cyRef: this.cytoRef,
obsId: this.obsId,
hostname: () => this.reactiveHostname
}
}
//. Child Component
inject: ['cyRef', 'hostname'],
// Add computed -
compCyRef(){
return this.cyRef()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment