Open dswbx opened 7 years ago
I'm experiencing exactly the same issue using tabs with react-native-router-flux (I think it uses react-native-tabs): https://github.com/aksonov/react-native-router-flux/issues/1669
Did you found any solution?
I am having the same problem. It was working fine few days back!
Anyone found a solution for this?
This may happen because tab contents gets unmounted when another tab pressed, therefore needs to rerender... It's something I can't accept, think about scroll position that is getting lost when tab changes. I ended up using this:
https://github.com/skv-headless/react-native-scrollable-tab-view Tabs stays along with each other, so they won't be rerendered. You could also disable swipe and transition so it feels exactly like tabs. Hope this helps you guys as much as it helped me.
@RSSfeed I think the problem was with the version of the module. It somehow breaks after version 3.37.0 I rolled back to version 3.37.0 and now it is working fine like before.
@RSSfeed How to navigate multiple scenes within a tab in react native scrollable tab view?
Using: react-native-router-flux@3.36.0 react-native-tabs@1.0.9 react-native@0.35.0 react@15.3.2
Description:
I expect tabs to not re-render, but I think this is caused by tab 2 being rendered after clicked (and forces tab 1 to re-render as well). Is there an option to automatically render all tabs at start? Or is this behavior caused by something else? I've attached all that might be helpful, sorry if this post is very long.
Scenes:
Page1.js (Feed tab):
Page2.js (Tab #2):
Console ouput of Demo GIF: