Maxiumum call stack happens on HMR with `:ref="setElement"` and editing that component
Vue version
3.2.41
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-qrfyaa?file=src%2FApp.vue,src%2FFoo.vue
Steps to reproduce
- Open reproduction
- Change
const count = ref(5);
inFoo.vue
toconst count = ref(56);
- The warning happens
This does not happen if <Foo ref="component" />
is used instead of <Foo :ref="changeRef" />
in App.vue
.
What is expected?
No warning happens.
What is actually happening?
The following error happens.
vue.js?v=f54006de:1274 [Vue warn]: Maximum recursive updates exceeded in component
. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.
System Info
No response
Any additional comments?
Original issue: https://github.com/vitejs/vite/issues/9713