Subscribe on changes!

Deep watch oldVal the same as newVal

avatar
Jun 3rd 2021

Version

3.0.11

Reproduction link

https://codesandbox.io/embed/festive-ganguly-pur4d

Steps to reproduce

When typing some word, simple watch is right work, but deep watch is incorrect.

What is expected?

If typing TEST

Simple watch:  TEST TES

Deep watch:   {keyword: "TEST"}  {keyword: "TES"}

What is actually happening?

Simple watch:  TEST TES

Deep watch:   {keyword: "TEST"}  {keyword: "TEST"}
avatar
Jun 3rd 2021

Using above Reproduction link, what I see is as expected:

image

avatar
Jun 3rd 2021

Sorry, the typesetting order is wrong and fixed.

avatar
Jun 3rd 2021

This is expected for objects because vue mutâtes the object. It's also documented