Get started with React Native and Webpack
- Node 5.x or better
- React Native for development
- Xcode for iOS development (optional)
- Android SDK for Android development (optional)
- Android Lollipop or better for Android device testing (optional)
- React Native for native app development
- Babel for ES6+ support
- Webpack module loader and bundler
- Docker and VirtualBox for Windows-based development
git clone https://github.com/7s4r/react-native-webpack-starter-kit.git && cd $_
npm i
Once dependencies are installed, run the starter kit with:
npm start
This will start the React Packager and a Webpack Dev Server. The dev server will watch your JS files for changes and automatically lint and generate the index.[platform].js
files expected by your React Native iOS or Android app.
Open ios/App.xcodeproj
in Xcode, build and run the project.
Unlike the app currently generated by react-native init
this app removes the UIViewControllerBasedStatusBarAppearance
key to prevent the app from logging an error in Xcode and leading to an App Store rejection. The key may be added back, if desired, but its value must be set to true
to prevent unexpected rejection during the review process.
For android development use the following:
npm run android-setup-port # Note that this option is available on devices running android 5.0+ (API 21)
react-native run-android