Skip to content

feat: dont recycle RNScreenView - #2069

Merged
tboba merged 7 commits into
mainfrom
@wolewicki/add-view-recycling
Mar 20, 2024
Merged

tboba merged 7 commits into
mainfrom
@wolewicki/add-view-recycling

Conversation

@WoLewicki

@WoLewicki WoLewicki commented Mar 19, 2024 •

Copy link
Copy Markdown
Member

Description

PR disabling view recycling from RNSScreenView component. It also enables us to fix long lasting issue with view recycling. This feature was added in RN 0.74 and will only work then.

Fixes #1628.

Changes

  • stop recycling RNSScreenView
  • Remove logic connected to problems with view recycling
  • Change the logic of setting push view controllers on new architecture, when transition is ongoing
  • Add if check for cases, when user navigates to more than one screen at the same time

Test code and steps to reproduce

See that modals and replace action work correctly. You can also use Test2069.tsx from FabricTestExample / TestsExample to test the behavior of replacing screens conditionally.

@tboba tboba mentioned this pull request Mar 20, 2024
1 of 2 tasks
Comment thread ios/RNSScreenStack.mm Resolved

@tboba tboba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks @WoLewicki for great cooperation on this! 🎉

@tboba
tboba merged commit 3b35894 into main Mar 20, 2024
@tboba
tboba deleted the @wolewicki/add-view-recycling branch March 20, 2024 18:16
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this pull request Oct 9, 2024
## Description

PR disabling view recycling from `RNSScreenView` component. It also
enables us to fix long lasting issue with view recycling. This feature
was added in RN 0.74 and will only work then.

Fixes software-mansion#1628.

## Changes

- stop recycling `RNSScreenView`
- Remove logic connected to problems with view recycling
- Change the logic of setting push view controllers on new architecture,
when transition is ongoing
- Add if check for cases, when user navigates to more than one screen at
the same time

## Test code and steps to reproduce

See that modals and `replace` action work correctly. You can also use
`Test2069.tsx` from FabricTestExample / TestsExample to test the
behavior of replacing screens conditionally.

---------

Co-authored-by: tboba <tymoteusz.boba@gmail.com>
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.

Conditional rendering of a screen shows a blank screen (new arch)

2 participants