ReactNative Eject Explained

Summary

If you created an app using create-react-native-app MyApp, ejecting your app gets your app to be the same as if you created your project using react-native init MyApp

aka

create-react-native-app MyApp > make changes to app > eject app

is roughly equivalent to

react-native init MyApp > make changes to app

More Details

What’s the difference between create-react-native-app MyApp and react-native init MyApp?

Quick start vs. Full scale development

The philosophy behind create-react-native-app is:

  • Minimal “Time to Hello World”: Create React Native App should reduce the setup time it takes to try building a mobile app to the absolute minimum, ideally on par with React web development (especially as seen with Create React App).
  • Develop on Your Device: It should be easy to develop on a physical device when you want to test how your app feels and responds to inputs.
  • One Build Tool: If you just want to get started with React Native, you shouldn’t need to install Xcode, Android Studio, NDKs, or mess with environment variables.
  • No Lock-In: You can always “eject” to your own build setup if you need to write custom native code or modify how your app is built.

Essentially, create-react-native-app lets you get up and running quickly without having to a do a lot of (or any) configuration. In order to do this, it hides a lot of details from you.

If you want to create a serious app, you need to set up a real development environment. You can do this from scratch by running react-native init <project-name>. If you started with a react native project using create-react-native-app, you can get to this same place by “ejecting” your app

More details from the official documentation about getting started with React Native can be found here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)