title: How to use mobx in react-native 0.56 (Babel 7) with Decorators
body: <p>i've upgraded my RN app from 0.55.4 to 0.56 that use Babel 7.</p>
  
  <p>In 0.55.4 to use decorators for MOBX i use "babel-plugin-transform-decorators-legacy" but is not compatible with Babel 7...</p>
  
  <p>react-native ver: 0.56.0
  mobx ver: 5.0.3
  mobx-react ver: 5.2.3</p>
  
  <p>does anyone have the solution?</p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The app works in <code>DEBUG</code> with this configuration</p>
  
  <p><strong><em>package.json</em></strong></p>
  
  <pre><code>...
  "devDependencies": {
      "@babel/core": "7.0.0-beta.47",
      "@babel/plugin-proposal-decorators": "7.0.0-beta.47"
      ...
  }
  </code></pre>
  
  <p><strong><em>.babelrc</em></strong></p>
  
  <pre><code>{
    "presets": [
      ["react-native"]
    ],
    "plugins": [
      ["@babel/plugin-proposal-decorators", { "legacy": true }]
    ]
  }
  </code></pre>
  
  <p>But in <code>RELEASE</code> xCode crash with this error:</p>
  
  <pre><code>babelHelpers.applyDecoratedDescriptor is not a function.
  </code></pre>
  
  <p><strong>UPDATE 2, WORKING CONFIG:</strong></p>
  
  <p>This is my working configuration:</p>
  
  <p><strong><em>package.json</em></strong></p>
  
  <pre><code>...
  "devDependencies": {
     "@babel/core": "7.0.0-beta.47",
     "@babel/plugin-proposal-decorators": "7.0.0-beta.47",
     "@babel/runtime": "7.0.0-beta.47",
     "babel-jest": "23.2.0",
     "babel-preset-react-native": "5.0.2",
     "jest": "23.3.0",
     "react-test-renderer": "16.4.1"
  }
  ...
  </code></pre>
  
  <p><strong><em>.babelrc</em></strong></p>
  
  <pre><code>{
    "presets": [
      ["react-native"]
    ],
    "plugins": [
      ["@babel/plugin-proposal-decorators", { "legacy": true }]
    ]
  }
  </code></pre>
  
  <p>Then in the index.js (main app starting file) i need to import the decorators babel libraries:</p>
  
  <p><strong><em>index.js</em></strong></p>
  
  <pre><code>import applyDecoratedDescriptor from '@babel/runtime/helpers/es6/applyDecoratedDescriptor';
  import initializerDefineProperty from '@babel/runtime/helpers/es6/initializerDefineProperty';
  
  Object.assign(babelHelpers, {applyDecoratedDescriptor, initializerDefineProperty});
  
  require('./app.js');
  </code></pre>
  
  <p><strong><em>app.js</em></strong></p>
  
  <pre><code>import {AppRegistry} from 'react-native';
  import AppName from './app/index';
  
  AppRegistry.registerComponent(appName, () =&gt; AppName);
  </code></pre>