-
Book Overview & Buying
-
Table Of Contents
Getting Started with React Native
By :
So far, we have been serving the application's static bundle (where all of our JavaScript code lives) from a node server started by either Xcode or a terminal using react-native start. Before we create releases for iOS and Android, we need to generate the static JS bundle that our application will load. We will begin by creating the release in iOS; for Android, skip to the generating the Android APK section.
Once again, we are going to use the react-native-cli and execute the bundle command. The bundle command requires three flags: c, platform, and bundle-output. The entry-file specifies the path to the root component, the platform is either iOS or Android, and bundle-output is the path to place the generated bundle.
From the terminal in the root directory, run react-native bundle with an entry-file of index.ios.js, platform iOS, and point the path of the bundle-output to ios/main.jsbundle:
$ react-native bundle --entry-file index.ios.js --platform ios -...
Change the font size
Change margin width
Change background colour