/re-start

Starter kit to target multiple platforms :globe_with_meridians: :iphone: :computer: with react-native' APIs.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

re-start 🌐 📱 💻

npm version Greenkeeper badge

re-start (1).png

Current status:

react-native-everywhere is now re-start (where re stands for react-everywhere). Good news is that react-native-cli now supports templates. So, it makes makes much more sense if this project is a react-native-template, which will remove the need to update this project with every major release of react-native. It just works as of now on all the platforms. So, no more git cloning.

Usage

Pre-requisites:

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 everywhere
  • 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/addDevDependencies.js

Note: 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"

Run the project on a specific platform:

Android

react-native run-android

iOS

react-native run-ios

Web

npm/yarn run web

Windows

react-native windows react-native run-windows

Build for production:

Android/iOS

This will help

Web

npm/yarn run build (this will build your production ready bundle)


Some very useful cross platform compatible libraries:


Progress:


Running demo on Web, Android, iOS and Windows(Universal):