Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about skip button in remotedev.io/local #14

Closed
HaveF opened this issue Jan 21, 2017 · 6 comments
Closed

about skip button in remotedev.io/local #14

HaveF opened this issue Jan 21, 2017 · 6 comments

Comments

@HaveF
Copy link
Contributor

HaveF commented Jan 21, 2017

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!

@zalmoxisus
Copy link
Owner

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

@HaveF
Copy link
Contributor Author

HaveF commented Jan 22, 2017

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?

@zalmoxisus
Copy link
Owner

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

@HaveF
Copy link
Contributor Author

HaveF commented Jan 24, 2017

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

@HaveF HaveF closed this as completed Jan 24, 2017
@HaveF
Copy link
Contributor Author

HaveF commented Jan 24, 2017

@zalmoxisus what android simulator you are using?

@zalmoxisus
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants