zalmoxisus / mobx-remotedev

MobX DevTools extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about skip button in remotedev.io/local

HaveF opened this issue · comments

commented

Thanks for your repo!
I tried RN today(react-native run-ios). Have a question to ask:

Should skip button works when use mobx?
2017-01-22 12 48 22

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++;
  }
commented

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.

  1. clone the repo
  2. cd to dir, and use yarn to install
  3. react-native upgrade, do not replace .babelrc
  4. rnpm link
  5. react-native run-ios

It should be run.

I test with onlyAction config, it seems strange.

1st case

2017-01-22 10 42 24

2017-01-22 10 42 58

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)

2017-01-22 10 52 36

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).

2017-01-22 10 53 52

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?
2017-01-22 10 59 21

other thoughts

I did read the doc, but not fully understand them.

  1. 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...

  2. 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).

commented

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

commented

@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.