🌐 📱 💻
Aim of this
- 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.
Structure of the project:
- 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 doesn't support adding dev dependencies and custom scripts to package.json, so I have created a custom script to do that.
- 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": "react-scripts start", "build": "react-scripts build"
- make sure that the version of react-native-windows is same as your react-native version, if you are targeting windows support.
Run the project on a specific platform:
npm/yarn run web
npm/yarn run electron
Build for production:
npm/yarn run build (this will build your production ready bundle)
Some very useful cross platform compatible libraries:
- 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
Running demo on Web, Android, iOS, Windows(Universal) and Electron:
Thanks goes to these wonderful people (emoji key):
Full list of contributors can be found here.
Companies that contribute to