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

Create bottom tabs once #4478

Merged
merged 2 commits into from
Dec 19, 2018
Merged

Create bottom tabs once #4478

merged 2 commits into from
Dec 19, 2018

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Dec 19, 2018

The BottomTabs library we use recreates its children each time a style property changes.
This can hinder performance quite a bit as the view creation logic is quite costly.
This commit introduces a simple fix to this issue - we delay view creation until all options are applied.

Additional changes

  • Prevent view recreation in onSizeChanged
  • Cleanup createTabs method

The BottomTabs library we use recreates its children each time a style property changes.
This can hinder performance quite a bit as the view creation logic is quite costly.
This commit introduces a simple fix to this issue - we delay view creation until all options are applied.
* Prevent view recreation in `onSizeChanged`
* Cleanup `createTabs` method
@guyca guyca merged commit b84a3e5 into master Dec 19, 2018
@guyca guyca deleted the createBottomTabsOnce branch December 19, 2018 16:02
vshkl pushed a commit to vshkl/react-native-navigation that referenced this pull request Feb 5, 2020
Create BottomTabs once when options are applied

The BottomTabs library we use recreates its children each time a style property changes.
This can hinder performance quite a bit as the view creation logic is quite costly.
This commit introduces a simple fix to this issue - we delay view creation until all options are applied.

BottomTabs refactor
* Prevent view recreation in `onSizeChanged`
* Cleanup `createTabs` method
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

Successfully merging this pull request may close these issues.

1 participant