- Target multiple platforms (Android, iOS, Web, Windows[UWP] and Electron[macOS, Ubuntu, 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 use 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 on your system(follow this)
react-native CLI (npm install -g react-native-cli
)
All you have to do is:
- Create a new react-native project using react-native-cli and specify this project as a template:
react-native init <Your Project Name> --template <Template Name>
- Since react-native-template does'nt support adding dev dependencies and custom scripts to package.json, so I have created a custom script to do that.
node scripts/additionalDependencies.js
- If the above script fails due to some reason, you can do it manually by copying the contents of devDependencies.json to your package.json's devDependencies object and adding following to the scripts object.
"web": "node scripts/start.js",
"build": "node scripts/build.js"
- react-native-web currently (20th of July, 2017) supports React/ReactDOM 15.4, 15.5, or 15.6, so make sure you do not upgrade if you want support for web.
- make sure that the version of react-native-windows is same as your react-native version, if you are targeting windows support.
react-native run-android
react-native run-ios
npm/yarn run web
react-native windows
react-native run-windows
npm/yarn run electron
npm/yarn run build
(this will build your production ready bundle)
- react-native-vector-icons
- axios
- react-router
- re-render (this is experimental and a WIP)
- support for web (react-native-web)
- 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