From 14a713e34b8ec671f746dbd04fbfc0c12eeed27c Mon Sep 17 00:00:00 2001 From: HaveF Date: Wed, 25 Jan 2017 13:21:08 +0800 Subject: [PATCH] works ref: https://github.com/zalmoxisus/mobx-remotedev/issues/9 --- README.md | 10 +++------- app/stores/counter_store.js | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ebf5556..c33bd37 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@ -# WIP -try set "remotedev-server" in local - - # example for remotedev + 1. clone the repo 2. cd to dir, and use yarn to install 3. react-native upgrade, donot replace .babelrc 4. rnpm link -5. react-native run-ios - - +5. yarn run remotedev +6. react-native run-ios -------- diff --git a/app/stores/counter_store.js b/app/stores/counter_store.js index a646e75..33434cd 100644 --- a/app/stores/counter_store.js +++ b/app/stores/counter_store.js @@ -2,7 +2,7 @@ import { observable, action, runInAction } from 'mobx' import remotedev from 'mobx-remotedev' import api from './api' -@remotedev({ remote: false, onlyActions: true, global: true, hostname: 'localhost', port: 8000 }) +@remotedev({ remote: true, onlyActions: true, global: true, hostname: 'localhost', port: 8000 }) class CounterStore { @observable counter = 0; @observable remoteCounter = 0;