Support for the experimental syntax 'decorators-legacy' isn't currently enabled in React Native

后端 未结 1 351
走了就别回头了
走了就别回头了 2021-01-26 13:54

**

MenuOverlay.js source code

**

/** @format */

import React, { PureComponent } from &         


        
相关标签:
1条回答
  • 2021-01-26 14:14

    You'll need to do a few things

    1. If you don't already have a .babelrc, create one and add the following
    {
      "plugins": [ 
        [ 
          "@babel/plugin-proposal-decorators", { "legacy": true } 
        ] 
      ]
    }
    

    1. Add the babel-plugin-proposal-decorators package:
    yarn add @babel/plugin-proposal-decorators
    
    0 讨论(0)
提交回复
热议问题