Giter VIP home page Giter VIP logo

babel-preset-react-native-stage-0's Introduction

babel-preset-react-native-stage-0

Have you encountered weird errors in React Native when trying to use babel-preset-react-native and babel-preset-stage-0 together? Are you generally just confused and frustrating by how hard it is to use the latest and greatest Babel features on RN? This preset is for you!

Installation

npm install babel-preset-react-native-stage-0 --save

Usage

Just add a .babelrc file to your React Native project that looks like this:

{
  "presets": ["react-native-stage-0"]
}

Do you want/need experimental legacy decorator support (provided by babel-plugin-transform-decorators-legacy)? Use this as your .babelrc instead:

{
  "presets": ["react-native-stage-0/decorator-support"]
}

Troubleshooting

Q: I added stage-0 to my "presets" list, and now everything is broken!

A: Don't do that! This preset supersedes the need for including the stage-0 preset, and works properly with React Native.


Q: I changed my .babelrc to the above, but I'm still getting strange Babel errors!

A: Have you cleared your packager cache? Run the following:

watchman watch-del-all
[the command you use to start the packager] --reset-cache

If things are still broken, open an issue and I'll try to help you. I may say "not a problem with this preset", and make you go open an issue on the react-native repo. Don't be mad at me if I do that!

babel-preset-react-native-stage-0's People

Contributors

skevy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.