class ListStore {
@obsevable list1 = "123"
list2 = "456"
}
const listStore = new ListStore()
const obj = {
...listStore
}
console.log(obj)
// {list2: "456"}
class ListStore {
@obsevable list1 = "123"
list2 = "456"
}
const listStore = new ListStore()
const obj = {
...listStore
}
console.log(obj)
// {list2: "456"}
convert with toJS of mobx
Previous: Nginx configure multiple domain names
as the title in fact, there are two major problems that need to be solved: 1. Extract the data into store and monitor the data. You can use Object.defineProperties or Proxy 2. You need to notify the component to update if the data chang...