- Target multiple platforms (Android, iOS, Web, Windows[UWP] and Electron[macOS, Linux, Windows]) with react native' APIs and a single codebase.
- Follow best practices while doing the above.
- Cut out the time and effort it takes to setup the project (based on
create-react-app
). - Achieve write once run everywhere with react-native (though react strictly says 'Learn once use anywhere').
- Mitigate git cloning or manual upgrading of boiler plates, which is possible because this project is a react-native template. π
- This project comprises of several templates that are curated keeping in mind the various use cases of initiating a new project. Based on your requirements and preferences, you can choose a templates that suits your you case the best.
- Node.js & npm
- react-native CLI (
npm install -g react-native-cli
)
- Create a new react-native project using
react-native-cli
and specifyre-base
as a template:react-native init <Your Project Name> --template re-base
- React Native don't support templates inheritance. If you want to use a
derived template like
re-dux
orre-route
, install them directly on top of the just created project. You'll probably get a warning about the project already exists, just say ityes
to overwrite the needed files.react-native init <Your Project Name> --template re-dux react-native init <Your Project Name> --template re-route react-native init <Your Project Name> --template re-start
re-start
template depend of bothre-route
andre-dux
, be sure to install them first in that order. - Since
react-native-template
doesn't support adding custom scripts topackage.json
, exec./finishInstall.js
to finish the project configuration. - Your project should now be ready to build apps for the different platforms.
npm/yarn run android
npm/yarn run ios
In case of problems, this tutorial will help you to configure your environment.
npm/yarn run electron
npm/yarn run web
npm/yarn run windows
Windows platforms needs to have installed the Windows 10 SDK Build 14393
to be
able to be build. A certificate is needed to sign the binary, follow the
instructions
to create or update the sign certificate. After that, a pop-up window would
appear during the first time you exec the build process asking to install the
certificate you've just created, just accept it.
npm/yarn run android:release
npm/yarn run electron:release
If you are running this on Linux or OSX, this will need you have wine
1.6
installed in your system because setting the Windows app icon makes usage
internally of the node-rcedit package.
npm/yarn run ios:release
npm/yarn run web:release
This will build your production ready bundle
npm/yarn run windows:release
- react-native-vector-icons
- axios
- react-router
- re-render (this is experimental and a WIP)
- support for web (react-native-web_improved)
- support for Windows (react-native-windows)
- Support for electron
- Compatibility with React 16
- Add Docs and FAQs
- Configure Travis and Greenkeeper
- Interactive CLI to create templates and components
Thanks goes to these wonderful people (emoji key):
Amogh Banta π» π¨ π π π€ |
JesΓΊs LeganΓ©s-Combarro π» π€ π |
Ankit Popli π π€ π |
Christopher Hein π π |
DuncanMacWeb π» |
---|
Full list of contributors can be found here.
MIT