Skip to content

Conversation

@kmichalikk
Copy link
Contributor

@kmichalikk kmichalikk commented Dec 4, 2025

Fixes https://github.com/software-mansion/react-native-screens-labs/issues/583

Description

This PR changes the logic for creating update transactions in ScreenContainer.onUpdate(). In JS stack, the list of screens on stack is repopulated on each update. Some screens can be set to not detach when covered. By some mysterious logic, we've been adding them to the pendingFront list and adding them on top. We change this logic so every screen except for the first one are added in the same way.

Changes

Modified & refactored logic for reattaching screens in ScreenContainer.onUpdate().

Test code and steps to reproduce

Use Test3450.

@kmichalikk
Copy link
Contributor Author

kmichalikk commented Dec 4, 2025

Reported some more issues that are out of scope of this PR: https://github.com/software-mansion/react-native-screens-labs/issues/697

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thanks!

@kmichalikk kmichalikk merged commit 0f70e5d into main Dec 5, 2025
5 checks passed
@kmichalikk kmichalikk deleted the @kmichalikk/push-after-3rd-screen-js-stack-fix branch December 5, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants