Skip to content

Subscribing to property of computed property #100

@lwansbrough

Description

@lwansbrough

I have the following scenario:

export default {
  name: 'Test',
  subscriptions () {
    return {
      test: this.project.test
    }
  },
  computed: {
    project () { return this.$store.getters['project/project'] }
  }
}

In this case, I have a store which produces the project object (not observable) with a test property (observable).

The problem is that if project changes, the subscription for test doesn't update to the new project.test -- so subsequent updates from the new project's test observable are not observed by the component.

How can this be addressed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions