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
## Description
The `updateViewControllerIfNeeded` call introduced by
software-mansion/react-native-screens#2230
forces the view controller to rebuild the subviews with the recent
config.
When the screen is being unmounted it replaces the subviews with nil
values as the `reactSubviews` are removed from the config one by one.
Snapshots made earlier get discarded in the process.
This PR adds a condition that prevents updating the view controller when
the screen is being changed + stops unnecessary snapshots when the
screen is not changed.
## Changes
- updated `Test556.tsx` repro
- added `isGoingToBeRemoved` property to `RNSScreenView`
- making snapshots / updating the view controller conditionally
<!--
## Screenshots / GIFs
-->
## Test code and steps to reproduce
- Use `Test556.tsx` repro
## Checklist
- [x] Included code example that can be used to test this change
- [x] Ensured that CI passes
---------
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
0 commit comments