futurice / pepperoni-app-kit

Pepperoni - React Native App Starter Kit for Android and iOS
http://getpepperoni.com
MIT License
4.63k stars 643 forks source link

Tabbed Navigation loses scroll position #110

Open nak1b opened 8 years ago

nak1b commented 8 years ago

The tab screen is unmounted on Switching between tabs and it re-render every time. If i add scrollview inside color tab and scroll to bottom. On switching tab scroll position is gone.

What should i change in Navigation Experiment to achieve this?

gogumai commented 8 years ago

+1

zachrnolan commented 7 years ago

Having the same issue. When switching tabs, all the views in that tab are unmounted. When switching back to the tab, everything is remounted again. How can I avoid this happening?

loiclouvet commented 7 years ago

@zachrnolan If you don't want tabs to be mount/unmount every time you switch tab, render all of them in render of navigationView, then you won't loose scroll position

sercanov commented 7 years ago

there is a question about it ; http://stackoverflow.com/questions/39007521/navigation-experimental-is-unmounting-tabs

I think the way navigation stack handling wrong here, switching tabs shouldn't be unmounting.