title: mobX: TypeError: Cannot read properties of undefined
body: <p>I just playground with some code with mobX, and this happened, don't know why but i'm sure it not much different from offical docs</p>
  <p>Here is <strong>store.tsx</strong></p>
  <pre><code>import { observable, computed, action, makeObservable, override, makeAutoObservable } from &quot;mobx&quot;
  
  class CounterStore {
    initValue = 0
    powValue = Math.pow(this.initValue, 2)
    constructor() {
      makeAutoObservable(this)
    }
    increaseNumber() {
      this.initValue = this.initValue + 1
    }
  }
  const Store = new CounterStore()
  export default Store
  </code></pre>
  <p>Here is where i use this. called <strong>increasement.tsx</strong></p>
  <pre><code>import { observer } from &quot;mobx-react&quot;
  
  export const IncrementButton = observer(({ store }) =&gt; {
    return (
      &lt;div&gt;
        &lt;button onClick={store.increaseNumber}&gt;Increase&lt;/button&gt;
        &lt;h1&gt;{store.initValue}&lt;/h1&gt;
      &lt;/div&gt;
    )
  })
  </code></pre>
  <p>And <strong>index.tsx</strong></p>
  <pre><code>ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;IncrementButton store={Store} /&gt;
      {/* &lt;TestUseState /&gt; */}
      {/* &lt;TestEffect /&gt;
       &lt;UseMemoTest /&gt; */}
    &lt;/React.StrictMode&gt;,
    document.getElementById(&quot;root&quot;),
  </code></pre>
  <p>Weird is, it show <code>initValue</code>, but when i click increase it show <code>can't not read properties</code>
  Please help, thanks</p>