You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We know tabs will keep tab-component-scene in memory.
See if I visit tab-home, do scroll for a while, then visit tab-settings, do somthing.
If I click tab-home icon, the scrollbar keeps well. This is the default and expected behavor.
In the tab-settings-scene, I have a button.
<ButtononPress={()=>{Actions.push('profile');}}>Go to profile</Button>
When I click this button, the profile screen shows, then I tap the Android Back Button, the profile-scene unmounted. I want make the profile mounted in forever.
In my Router, I write a backAndroidHandler, call Actions.pop().
Is there a way to not pop the profile-scene, as profile is a tab like tab-home, so that I can keep the tab-profile state(such as the scrollbar position) if user visit again?
Maby a Actions.hide().
Or:
Is there a "virtual tab" that is a tab-scene, but invisible in tabbar?
RouterStackScene(key=maininitial={is_user_authed})Tabs(key=tabs)Scene(key=home)Scene(key=settings)Scene(key=profilelazy={true}virtual={true}){/* see the virtual props */}Scene(key=logininitial={!is_user_authed})
So that user will see two tabs(home and settings) in the tabar, but in real, I have three tabs(home, settings and profile).
Sorry for my poor English.
What I want to do is something like this:
In jQuery/Bootstrap,
I have a <div class="modal">...</div>,
then I can use $(".modal").show() / $(".modal").hide(),
But not $(".modal").create() / $(".modal").destory()
I tried the Modal and Lightbox component, it will also unmount.
Version
Tell us which versions you are using:
Expected behaviour
Keep components in memory.
Actual behaviour
Actions.pop() will destroy the current scene.
Steps to reproduce
There are 2 tabs in my app:
We know tabs will keep tab-component-scene in memory.
See if I visit tab-home, do scroll for a while, then visit tab-settings, do somthing.
If I click tab-home icon, the scrollbar keeps well. This is the default and expected behavor.
In the tab-settings-scene, I have a button.
When I click this button, the profile screen shows, then I tap the Android Back Button, the profile-scene unmounted. I want make the profile mounted in forever.
In my Router, I write a backAndroidHandler, call Actions.pop().
Is there a way to not pop the profile-scene, as profile is a tab like tab-home, so that I can keep the tab-profile state(such as the scrollbar position) if user visit again?
Maby a
Actions.hide()
.Or:
Is there a "virtual tab" that is a tab-scene, but invisible in tabbar?
So that user will see two tabs(home and settings) in the tabar, but in real, I have three tabs(home, settings and profile).
Sorry for my poor English.
What I want to do is something like this:
In jQuery/Bootstrap,
I have a
<div class="modal">...</div>
,then I can use
$(".modal").show() / $(".modal").hide()
,But not
$(".modal").create() / $(".modal").destory()
I tried the Modal and Lightbox component, it will also unmount.
The same question in react navigation:
react-navigation/react-navigation#2331
react-navigation/react-navigation#2365
I created a expo repo snack:
Everytime I enter the detail page, it will remount(the number changes), which I don't want.
The text was updated successfully, but these errors were encountered: