Skip to content

Merging data reactively #2897

@bopjesvla

Description

@bopjesvla

There seems to be no way to use Vue's merge strategies when assigning new data to a mounted instance. Mixins and vm.$options = Vue.util.mergeOptions(vm.$options, {data: x => newData}, vm) aren't reactive.

Something like vm.$merge(newData) or vm.$mixin({data: newData}) would be nice. The ability to add mixins on the fly would make Vue very flexible (vm.$mixin({computed: {x: newFn}}) would be a neat way to reactively change computed functions, for example), but $merge is probably much easier to implement.

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