Subscribe on changes!

Computed properties of an external object become frozen after unmounting/remounting component

avatar
May 1st 2021

Version

3.0.11

Reproduction link

https://codesandbox.io/s/vue-3-reactivity-bug-2-7hthv?file=/src/App.vue

Steps to reproduce

  1. Input something in the first and second fields. See, that 'Form Invalid' changes to 'Form Valid'.

  2. Clear the input and click on the 'Toggle Modal' button.

  3. Input something in the first and second fields. See, that 'Form Invalid' doesn't change to 'Form Valid'.

What is expected?

It's expected, that after remounting the component the label 'Form Invalid' changes to 'Form Valid' in the last step.

What is actually happening?

After remounting the component the label 'Form Invalid' doesn't change to 'Form Valid' in the last step.


Similar issues: first, second. But they describe the situation when object with computed properties is created inside setup. In this issue, object is created outside the unmounted component and injected in the component.

avatar
May 1st 2021

Actually, it's the same issue. My fault. Closed.