V
V
Vladimir Golub2021-06-08 16:57:06
Vue.js
Vladimir Golub, 2021-06-08 16:57:06

How to track changes to an object received via mapState?

I get the value from state, as an object

...mapState({
        test: state => state.calendar.test
      }),


I tried, through deep, but it does not work
test: {
        handler: (newValue) => {
          console.log({ newValue });
        },
        deep: true
      }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WapSter, 2021-06-08
@RazerVG

https://ru.vuejs.org/v2/guide/reactivity.html#%D0%...
Or switch to vue 3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question