Skip to content
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

Weird bugs with updating data properties (Options API only) #375

Closed
SimonEast opened this issue May 9, 2024 · 1 comment · Fixed by #395
Closed

Weird bugs with updating data properties (Options API only) #375

SimonEast opened this issue May 9, 2024 · 1 comment · Fixed by #395
Labels
bug Something isn't working

Comments

@SimonEast
Copy link

I'm experiencing weird bugs with attempting to use the DevTools to update a component's internal state. Using a very basic Vue 3 setup.

See this link for a simple reproduction:
https://stackblitz.com/edit/vitejs-vite-xhoeo7?file=src%2FApp.vue,src%2Fcomponents%2FHelloWorld.vue,src%2Fcomponents%2FHelloWorld2.vue&terminal=dev

I've created two near-identical components:

  • HelloWorld uses the Composition API - updating its internal variables works fine
  • HelloWorld2 uses the Options API - updating its internal variables does not work (the variables retain their existing value with no changes), and sometimes it even modifies the variables inside the first HelloWorld component, instead

Is this a bug with how the DevTools updates vars that are defined via the Options API?

@SimonEast
Copy link
Author

Great. Thanks @alexzhang1030.

I haven’t tested it out yet, but looks like you spent a fair bit of time setting up a prototype to properly test this. Thanks for your efforts! 😊👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants