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

Android drawer slow switching between stacks #3273

Closed
rtt63 opened this issue Sep 17, 2018 · 1 comment
Closed

Android drawer slow switching between stacks #3273

rtt63 opened this issue Sep 17, 2018 · 1 comment

Comments

@rtt63
Copy link

rtt63 commented Sep 17, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.1
  • react v16.2
  • react-native v0.56

Expected behaviour

When I am navigating between stacks on android, it should be as fast as on iOS, or close to it

Actual behaviour

When I am navigating between stacks on my android (actually I am navigating to specific scene of different stack), it's have delays sometimes (1-2 secs, sometimes more). Navigating between scenes in the same stack is extreamly fast everywhere.

What I was worry about:
latest version - done, I updated it
remove console.logs from entire app
check gebug mode - checked, I am totally in release mode

Maybe the cause of this problem is my undertanding of on/onEnter prop, so please fix me if I am using onEnter wrong

<Scene
  component={Any}
  ..props
  on={() => {
     request()
     anotherRequest()
  }}
/>

It's the same on iOS and android, except on iOS I have tabs={true} and lazy={true}. So I just replace tabs to drawer on android, and specify contentComponent for Drawer at upper stack which is my entire app

I have hideNavBar={true} everywhere btw

@aksonov
Copy link
Owner

aksonov commented Sep 21, 2018

Yes, it is possible that you are doing something CPU-intensive within your onEnter. You should use InteractionManager.runAfterInteractions https://facebook.github.io/react-native/docs/interactionmanager

@aksonov aksonov closed this as completed Sep 21, 2018
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