ckinmind / ReactCollect

📦收集整理所有在使用React/Mobx中遇到的问题, 请看issues
93 stars 15 forks source link

关于深层嵌套object是否observable #129

Open ckinmind opened 7 years ago

ckinmind commented 7 years ago
 @observable test = {
    hello: {
      a: '123',
      b: '345',
    },
    world: 'hahah',
  }

    console.log(isObservable(this.test))             // true
    console.log(isObservable(this.test.hello))    // true
    console.log(isObservable(this.test.hello.a)) // false
    console.log(isObservable(this.test.world))   // false