-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue-Mobx integration broken with PR #7828 #9329
Comments
Thanks for mentioning me, the other option that I think would be doable is to change mobx itself so that it would allow setting I'm not sure of the impact of such a change though. Either way, it would be nice to have test(s) that are run as part of the test suite to verify the mobx integration. I think they should go into the |
Good point @Nemikolh - I have no context for which might be the better place to fix this. I followed the Vue path because that's the package that appeared to break. Maybe core Vue and/or Mobx contributors will have an opinion (that is compatible😜). It does seem that tests would be well placed in |
what is the actual thing breaking Vue, without any mobx/mobx-vue import? |
Hi @posva, to be honest, probably nothing; but neither is anything broken in Mobx unless you try to use Vue - so I'm a bit at a loss as to how to proceed 😞 With my personal apps (using Vue and Vuex) nothing is wrong. When I'm working with my employers app (Vue, Mobx, MST) this function:
in I forked the Mobx repo and added a check to the end of the
But I have a really bad feeling about that as I have no idea what I might be breaking in Vue. It looks like Vue is trying to hook into the prototype chain to observe changes, but Mobx is already doing that. So, I don't know what the answer is. |
Version
2.5.18
Reproduction link
https://codesandbox.io/s/k90k8kwn2r
Steps to reproduce
mobxjs/mobx-vue
package (or a custom integration with Mobx)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.
The text was updated successfully, but these errors were encountered: