Skip to content

Instantly share code, notes, and snippets.

@htuzel
Created April 26, 2020 12:49
Show Gist options
  • Select an option

  • Save htuzel/84a221b6086072575950205620fb3cc9 to your computer and use it in GitHub Desktop.

Select an option

Save htuzel/84a221b6086072575950205620fb3cc9 to your computer and use it in GitHub Desktop.
Install decorator plugins
npm i --save-dev @babel/plugin-proposal-class-properties @babel/plugin-proposal-decorators
change babel.config.js
/* eslint-disable prettier/prettier */
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'@babel/plugin-proposal-decorators',
{'legacy': true},
],
['@babel/plugin-proposal-class-properties', {'loose': true}],
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment