Tell us which versions you are using: ^4.0.0-beta.17
I used to nest Scenes into buckets to stop users going to the previous screen. This is not working
now on latest build. Can anyone please help me out? Below is the code.
Logic is that user should be shown splash screen only once. Later on user cannot go back to splash screen.
<Router>
<Scene key="root">
<Scene key="splash" component={SplashScreen} initial />
<Scene key="Screen1" component={Screen1} />
<Scene key="Screen2" component={Screen2} />
</Scene>
</Router>
You can use type="replace" in Screen1 scene to stop users going back to splash screen.
Try this for Scene1
<Scene key="Screen1" type="replace" component={Screen1} />
Awesome. Finally something that worked. @zainmustafa i wonder why this prop is nowhere in v4 DOCS.
Yeah, it has to be there in docs. Glad it helped.
Added to docs, closing.
type={ActionConst.RESET} in Scene
You can use
type="replace"in Screen1 scene to stop users going back to splash screen.
Try this for Scene1
<Scene key="Screen1" type="replace" component={Screen1} />
yeah its working
Replace did not work for. This is what worked in my case:
https://stackoverflow.com/a/61349171/5950360
Most helpful comment
type={ActionConst.RESET} in Scene