react-native-boilerplate
boilerplate code for react-native
This repo was cloned from the react-boilerplate project for learning. This project is still under development.
Quick start
- Make sure that you have Node.js v8.10, npm v5 and react-native-cli v2.0.1 or above installed.
- Clone this repo using
git clone --depth=1 https://github.com/iethem/react-native-boilerplate <YOUR_PROJECT_NAME>
- Move to the appropriate directory:
cd <YOUR_PROJECT_NAME>
. - Run
npm install
in order to install dependencies. - Run
react-native eject
to create android and ios folders. - Run
react-native link
to link libraries.
Now you're ready to rumble!
Please note that this boilerplate is production-ready and not meant for beginners! If you're just starting out with react or redux, please refer to https://github.com/petehunt/react-howto instead. If you want a solid, battle-tested base to build your next product upon and have some experience with react, this is the perfect start for you.
This project uses react-navigation for navigating between screens. The stack navigator can be found under the app/containers/App folder. For more information see https://reactnavigation.org/docs/en/hello-react-navigation.html
Generators
npm run generate
Allows you to auto-generate boilerplate code for common parts of your
application, specifically component
s, and container
s. You can
also run npm run generate <part>
to skip the first selection. (e.g. npm run generate container
)
Documentation (for react-boilerplate)
The documents mentioned here are taken from the react-boilerplate, but most of the information described applies to react-native-boilerplate.
- The Hitchhikers Guide to
react-boilerplate
: An introduction for newcomers to this boilerplate. - Overview: A short overview of the included tools
- Commands: Getting the most out of this boilerplate
- Testing: How to work with the built-in test harness
- Styling: How to work with the CSS tooling
- Your app: Supercharging your app with Routing, Redux, simple asynchronicity helpers, etc.
- Troubleshooting: Solutions to common problems faced by developers.
License
This project is licensed under the MIT license. For more information see LICENSE.md
.