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

Bad performance during orientation change with tabs #2483

Closed
CptFabulouso opened this issue Oct 9, 2017 · 2 comments
Closed

Bad performance during orientation change with tabs #2483

CptFabulouso opened this issue Oct 9, 2017 · 2 comments

Comments

@CptFabulouso
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0 - beta 21
  • react-native v0.48.4

Expected behaviour

When I have tabs layout and rotate device, I do not expect to see next screen to the right. In other words: rerender layouts during screen transition

Actual behaviour

When device is rotated, the whole layout gets rotated first with the width of previous orientation and next tab (screen and header) to the right of selected tab is visible for awhile (if we go from port to land).

Steps to reproduce

running on ios device (iPhone 5), it is not visible on emulator. Android not tested at all
Happens in example project in tabBar page. It is noticeable in debug scheme and not very noticeable in release scheme, but that changes with more complicated layout.

It would be great if it could be implemented into this library somehow, but workarounds are also welcomed. I would much rather wait for recalculation of layout before the whole transition happens than the current behaviour.

@aksonov
Copy link
Owner

aksonov commented Oct 17, 2017

RNRF uses react-navigation for rendering. Please check beta.22 (it uses rn beta.13) and check pure react-navigation examples. If it doesn't work as expected, please create issue there.

@aksonov aksonov closed this as completed Oct 17, 2017
@CptFabulouso
Copy link
Author

This is actually problem of react-native-tab-view, which react-navigation is using for tabs. But in react-navigation is this example of custom tabs, which just renders current screen and custom tab bar and no screens around.
So we could recreate that logic, use TabView components of react-navigation so it looks like current Tabs navigation and use that if swipeEnabled = {false}. We don't need pages rendered next to each other, if we don't swipe between them. I would love to do that, but Iam quite confused how this library even works.

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