Today we’re announcing Create React Native App: a new tool that makes it significantly easier to get started with a React Native project! It’s heavily inspired by the design of Create React App and is the product of a collaboration between Facebook and Expo (formerly Exponent).

Many developers struggle with installing and configuring React Native’s current native build dependencies, especially for Android. With Create React Native App, there’s no need to use Xcode or Android Studio, and you can develop for your iOS device using Linux or Windows. This is accomplished using the Expo app, which loads and runs CRNA projects written in pure JavaScript without compiling any native code.

Try creating a new project (replace with suitable yarn commands if you have it installed):

-
$ npm i -g create-react-native-app
-$ create-react-native-app my-project
-$ cd my-project
-$ npm start
-
+
$ npm i -g create-react-native-app
+$ create-react-native-app my-project
+$ cd my-project
+$ npm start
+

This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript. Calls to console.log are forwarded to your terminal. You can make use of any standard React Native APIs as well as the Expo SDK.

What about native code?

Many React Native projects have Java or Objective-C/Swift dependencies that need to be compiled. The Expo app does include APIs for camera, video, contacts, and more, and bundles popular libraries like Airbnb’s react-native-maps, or Facebook authentication. However if you need a native code dependency that Expo doesn’t bundle then you’ll probably need to have your own build configuration for it. Just like Create React App, “ejecting” is supported by CRNA.

diff --git a/blog/page4/index.html b/blog/page4/index.html index f6616c805ed..d888be1139d 100644 --- a/blog/page4/index.html +++ b/blog/page4/index.html @@ -182,7 +182,7 @@ index e98ebb0..2fb6a11 new Button documentation, complete with a runnable example!

Speed up react-native init using Yarn

You can now use Yarn, the new package manager for JavaScript, to speed up react-native init significantly. To see the speedup please install yarn and upgrade your react-native-cli to 1.2.0:

-
$ npm install -g react-native-cli
+
$ npm install -g react-native-cli
 

You should now see “Using yarn” when setting up new apps:

Using yarn

diff --git a/docs/0.10/getting-started.html b/docs/0.10/getting-started.html index f901a156304..ccde8d2f28f 100644 --- a/docs/0.10/getting-started.html +++ b/docs/0.10/getting-started.html @@ -83,13 +83,13 @@

Assuming that you have Node 10 LTS or greater installed, you can use npm to install the Expo CLI command line utility:

-
npm install -g expo-cli
+
npm install -g expo-cli
 

Then run the following commands to create a new React Native project called "AwesomeProject":

expo init AwesomeProject
 
-cd AwesomeProject
-npm start # you can also use: expo start
+cd AwesomeProject
+npm start # you can also use: expo start
 

This will start a development server for you.

Running your React Native application

diff --git a/docs/0.10/getting-started/index.html b/docs/0.10/getting-started/index.html index f901a156304..ccde8d2f28f 100644 --- a/docs/0.10/getting-started/index.html +++ b/docs/0.10/getting-started/index.html @@ -83,13 +83,13 @@