title: undefined is not a function (evaluating 'decorator(target, property, desc)')
body: <p>I want to integrate <a href="https://mobx.js.org/" rel="nofollow noreferrer">mobx</a> and <a href="https://github.com/pinqy520/mobx-persist" rel="nofollow noreferrer">mobx-persist</a> with <a href="https://reactnavigation.org/" rel="nofollow noreferrer">react-navigation</a>.<br>
  I read these articles: </p>
  
  <p>[1] <a href="https://hackernoon.com/react-navigation-with-mobx-2064fcdaa25b" rel="nofollow noreferrer">https://hackernoon.com/react-navigation-with-mobx-2064fcdaa25b</a><br>
  [2] <a href="https://blog.callstack.io/write-react-native-apps-in-2017-style-with-mobx-e2dffc209fcb" rel="nofollow noreferrer">https://blog.callstack.io/write-react-native-apps-in-2017-style-with-mobx-e2dffc209fcb</a><br>
  [3] <a href="https://github.com/react-navigation/react-navigation/blob/8e8d3d562c9e80616f145f97ffb02dcf2048e67e/docs/guides/Mobx-Integration.md" rel="nofollow noreferrer">https://github.com/react-navigation/react-navigation/blob/8e8d3d562c9e80616f145f97ffb02dcf2048e67e/docs/guides/Mobx-Integration.md</a><br>
  [4] <a href="https://stackoverflow.com/questions/45670065/mobx-react-native-way-to-inject-stores">MobX + React Native : way to inject stores</a><br>
  [5] <a href="https://stackoverflow.com/questions/48437102/mobx-why-should-i-use-observer-when-i-could-use-inject-when-injecting-data">MobX - Why should I use `observer` when I could use `inject` when injecting data into a React component</a><br>
  [6] <a href="https://stackoverflow.com/questions/46139278/injecting-store-in-react-component-results-in-error">Injecting Store in React component results in Error</a>  </p>
  
  <p>But I still got this error:</p>
  
  <pre><code>undefined is not a function (evaluating 'decorator(target, property, desc)')
  </code></pre>
  
  <p>This is my App.js render:</p>
  
  <pre><code>render() {
      const hydrate = create({
          storage: AsyncStorage
      });
  
      hydrate('playerStore', stores.PlayerStore);
      hydrate('settingStore', stores.SettingStore);
      // .then(
      //     // () =&gt; console.warn('some hydrated')
      // );
  
      return &lt;Provider {...stores} &gt;
          &lt;AppWithNavigationState /&gt;
      &lt;/Provider&gt;;
  }
  </code></pre>
  
  <p>This is my routeStore.js:</p>
  
  <pre><code>import {observable} from "mobx";
  import {action} from "mobx-react/native";
  import AppDrawer from "../appDrawer";
  import {autobind} from 'core-decorators';
  
  export default class RouteStore {
      @observable.ref navigationState = {
          index: 0,
          routes: [
              { key: "R1", routeName: "ContentStack" },
          ],
      };
  
      @action
      dispatchNavigation(action, stackState = true) {
          const previousNavState = stackState ? this.navigationState : null;
          return this.navigationState = AppDrawer.router.getStateForAction(action, previousNavState);
      }
  }
  </code></pre>
  
  <p>This is my appWithNavigationState.js:</p>
  
  <pre><code>import React from 'react';
  import {observer, inject} from "mobx-react/native";
  import {addNavigationHelpers} from "react-navigation";
  import AppDrawer from "../appDrawer";
  
  @inject(stores =&gt; ({ routeStore: stores.RouteStore }))
  @observer
  export default class AppWithNavigationState extends React.Component {
      render() {
          return (
              &lt;AppDrawer navigation={addNavigationHelpers({
                  dispatch: this.props.routeStore.dispatchNavigation,
                  state: this.props.routeStore.navigationState,
              })} /&gt;
          );
      }
  }
  </code></pre>
  
  <p>I also use decorator package as below:</p>
  
  <pre><code>npm install babel-plugin-transform-decorators-legacy --save-dev
  </code></pre>
  
  <p>and this setting in <code>babelrc</code> file:</p>
  
  <pre><code>{
    "presets": ["react-native"],
    "plugins": ["transform-decorators-legacy"]
  }
  </code></pre>
  
  <p>Can you help me to fix this?</p>