title: Are these two the same?
body: <p>I am learning Mobx. when(predicate: () => boolean, effect?: () => void, options?)</p>
  
  <p>As written on mobx:</p>
  
  <pre><code>class MyResource {
      constructor() {
          when(
              () =&gt; !this.isVisible,
              () =&gt; this.dispose()
          );
      }
  
      @computed get isVisible() {
          ......
      }
  
      dispose() {
          ......
      }
  }
  </code></pre>
  
  <p>My question is that if I write as follows, do these two the same?</p>
  
  <pre><code>class MyResource {
      constructor() {
          when(
              !this.isVisible,
              this.dispose
          );
      }
  
      @computed get isVisible() {
          ......
      }
  
      dispose() {
          ......
      }
  }
  
  </code></pre>