This is an example application which shows how to set up horizon with react-native.
Horizon is still under development and can't be used with react-native yet. This repository is used to explore the pieces which will have to be changed. This application may have errors when it is run.
Install global packages if you don't have them already
$ npm install -g react-native-cli
$ npm install -g horizonInstall local dependencies
$ cd HorizonExampleApp
$ npm installStarting bundler & simulator
$ cd HorizonExampleApp
$ npm start
$ react-native run-ios # in a new terminal instanceStaring Horizon server
$ cd server
$ hz serve --devThese steps were executed to set up this project:
$ mkdir horizon-react-native
$ cd horizon-react-native
$ npm i -g react-native-cli # if you don't have it already
# create react-native application
$ react-native init HorizonExampleApp
# now on to horizon
$ hz init server
$ cd server
$ rm -r dist src # remove unused directoriesFinally, some horizon code was added to HorizonExampleApp/index.ios.js.
You could go from here for real projects and set up proper npm scripts, get rid of the global dependencies and so on.