`Maximum recursive updates exceeded`: when accessing a responsive variable in `onScopeDispose`
Vue version
3.2.37
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-t5bbox?file=src/HelloWorld.vue
Steps to reproduce
- open the browser's console
- update any code in
HelloWorld.vue
, for example:console.log('watch', element)
=>console.log('test', element)
- observe the console logs
What is expected?
this component will be rendered only once
What is actually happening?
[Vue warn]: Maximum recursive updates exceeded in component
System Info
No response
Any additional comments?
I also ran some other tests, such as commenting out line 11 of HelloWorld.vue
or using onUnmounted
instead of onScopeDispose
, did not produce this warning.