Skip to content

Vue-Mobx integration broken with PR #7828 #9329

Open
@bitencode

Description

@bitencode

Version

2.5.18

Reproduction link

https://codesandbox.io/s/k90k8kwn2r

Steps to reproduce

  • Use the mobxjs/mobx-vue package (or a custom integration with Mobx)
  • Everything worked fine on Vue 2.5.17 and is broken on 2.5.18 and above
  • See that TypeErrors are thrown

What is expected?

Vue would not attempt to to set the __proto__ property of a Proxy.

What is actually happening?

Reactivity with Mobx is broken:

[Vue warn]: Error in event handler for "input": "TypeError: 'set' on proxy: trap returned falsish for property 'proto'"

We attempted to upgrade Vue from 2.5.17 to latest version for our applications - thought it would be smooth because upgrade target was still 2.5.x, but ever version after 2.5.18 is broken with Mobx integration.

We have a custom integration with Mobx-state-tree, but some of the code is very similar to mobxjs/mobx-vue integration code. We are not using that library, and I'm not a Vue internals expert, but I think I tracked the problem down to this PR: #7828.

Since then I have searched around and found this issue reported to that package also: mobxjs/mobx-vue#15 (comment). @Nemikolh wrote the codesandbox example I referenced above and it appears to be the same conclusion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions