about skip button in remotedev.io/local
HaveF opened this issue · comments
Thanks for your repo!
I tried RN today(react-native run-ios
). Have a question to ask:
Should skip button works when use mobx?
HaveF/mobx-react-native-template-remotedev: A react-native template using advanced react-native Architecture with mobx
RN 0.40, mobx 3
Thanks!
Thanks for the example, but unfortunately, I couldn't get it run.
On iOS it gets this error. On Android: ./mobx-react-native-template-remotedev/app/navigation/tab_navigator.js: Unexpected token (8:0)
. Probably I need to upgrade XCode for iOS.
Skipping actions works only in strict mode or when setting onlyActions
parameter to true
, so you'll have there only MobX actions (not stuff like update
, change
...). However you're not using mobx actions yet. It should be:
- increment() {
+ @action increment() {
this.counter++;
}
Thanks for your reply:grin:. I just update the repo, remove ios and android dir for clean installation so that you can reproduce what I did.
- clone the repo
- cd to dir, and use yarn to install
- react-native upgrade, do not replace .babelrc
- rnpm link
- react-native run-ios
It should be run.
I test with onlyAction config, it seems strange.
1st case
click the | +1 |
button twice, the count display right(2 times
).
(the below picture is run as another different time--but did the same as above, so the time is a bit different, but the first action time is strange sometime)
If I click the skip for last action, it skip the last action, the display is right(1 times
), but when I click that button again, the counter in the iOS screen is wrong(1 times
, it should be 2 times
).
2nd case
reload and click | +1 |
button twice, the counter is 2 times
, after that, click skip button at first action, the screen display 0 times
, it should be like this?
other thoughts
I did read the doc, but not fully understand them.
-
Maybe
onlyActions
be true as default option? When I quick view the doc, I believe, set true, will only display actions, but leave it black(false), it will be display action and other stuff... -
global
should be true as default?
It was a bug on remotedev
which altered actions. I've fixed that. Just update npm i remotedev@latest
or remove node_modules
and install dependencies again.
I still wasn't able to run ios build (as for the exception above), but android build works (so you could revert that commit removing it).
Nice, it works as expected:+1:
About the ios, clean the dir iOS, and do the step what I said before, it should works...
I use 8.2.1 version of xcode
@zalmoxisus what android simulator you are using?
@HaveF I'm using Android Emulator. I guess it's not as good as genymotion.
As for ios, I tried your tips and also all others from that issue, and unfortunately it didn't help. I should update xCode to 8. Weird it was working before. Anyway I'm not developing any React Native apps at the moment.