In native Mini Program, is there any solution similar to vue's computed and watch?

is there any solution similar to vue"s computed and watch in native Mini Program?

the one I use now is not perfect.
take watch as an example. If you change
data.obj, you can monitor it. If you change
data.obj.a, you will not be able to monitor it.

ask the bosses to share ~


try mobx


so want to use vue to mpvue directly


if there are no restrictions on the base library, there is an official computed component extension : https://github.com/wechat-min...
the following code is excerpted from the official website:

const computedBehavior = require('miniprogram-computed')

Component({
  behaviors: [computedBehavior],
  data: {
    a: 0,
  },
  computed: {
    b() {
      //  data  setData 
      //  this.data.b 
      return this.data.a + 100
    },
  },
  methods: {
    onTap() {
      this.setData({
        a: PPthis.data.a,
      })
    }
  }
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8f2cb-123c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8f2cb-123c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?