-
The stack navigation is not working as expected, For example, I have four screens in my app Home, Posts, Post, and Profile. When I open the Posts screen and clicked on it to open a post on the Post screen, an id is passed to the screen to fetch the corresponding screen. From the Post screen, I click on the author of the post to open the Profile screen, From the author's profile screen I open another post. Expectation: The screens should be stacked in order, so I should have two Post screens in the stack What's Happening: The Post screen that was opened first will be moved to the top of the stack when the post is opened from the profile screen. Can this be resolved? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The default behavior is how stack navigation works, you're describing a different behavior. This can be accomplished in <Screen name="[id]" getId={() => Date.now()}> Creating a random ID will cause the stack to keep adding new screens instead of reusing existing screens. |
Beta Was this translation helpful? Give feedback.
-
Thank you. This helped a alot.
…On Wed, Jul 5, 2023 at 5:27 PM Evan Bacon ***@***.***> wrote:
The default behavior is how stack navigation works, you're describing a
different behavior. This can be accomplished in ***@***.***
by doing something like:
<Screen name="[id]" getId={() => Date.now()}>
Creating a random ID will cause the stack to keep adding new screens
instead of reusing existing screens.
—
Reply to this email directly, view it on GitHub
<#731 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGVS5INAGGFN73UI75OA4W3XOWPZFANCNFSM6AAAAAAZ7DMHZA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
The default behavior is how stack navigation works, you're describing a different behavior. This can be accomplished in
[email protected]
by doing something like:Creating a random ID will cause the stack to keep adding new screens instead of reusing existing screens.