Closed acaininet closed 1 year ago
There are a variety of issue posts on different repositories in search of a permanent solution to this issue. This is an especially impactful issue as this form of navigation is the officially supported form of navigation for React Native as supported by the project's documentation.
This is a similar issue posted to the react-navigation repository: https://github.com/react-navigation/react-navigation/issues/10835
There are several other issues posted to other repositories: https://github.com/software-mansion/react-native-screens/issues/1684 https://github.com/microsoft/react-native-windows/issues/11094 https://github.com/software-mansion/react-native-screens/issues/1684 https://github.com/react-navigation/react-navigation/issues/11146
Most valid information seems to come from: https://github.com/microsoft/react-native-windows/issues/10484#issuecomment-1232785185 Although, this does not provide a permanent solution for the issue. Please expedite a solution to this as it is a fundamental control in React Native and significantly impacts cross platform development
My understanding is that the react-navigation
(and screens
) implementation for Windows is partial. There's a need for a native solution and one hasn't been built yet. There's been efforts to patch the symptoms in place, but there are gaps and differences in behavior that still need to be corrected. @chiaramooney and @AgneLukoseviciute have some of the background for where things are.
However, those implementations are not covered by this repo. The issues should be tracked on the corresponding repos where the code in question lives. From your links it looks like they are (https://github.com/react-navigation/react-navigation/issues/10835). Closing this issue.
@chrisglein Both repos are fingerpointing. https://github.com/react-navigation/react-navigation/issues/10835 @satya164 right here as it works on all platforms.
This is quit crucial for using RN-Windows, we delayed our update strategy and are holding strong on RN-Windows 65 as there it still works.
Problem Description
https://user-images.githubusercontent.com/104597574/227246914-5561868d-3e20-4b2e-aa5e-334731017cd0.mp4
Using @react-navigation/native , screens are being unmounted and mounted, in the process losing states. Screens mount and unmount on any screen change, losing all states in RNW, not congruent with android/ios functionality. Several notes from video: Text fields in Feed screen have been attached to states. Those states are not retained after switching to a different screen and back. Any screen operation results in Feed being unmounted and mounted again (killing states, etc.). This is reflected in the console output.
I first saw this problem in @react-navigation/stack in the project that I am working on. Reproduced in @react-navigation/native with @react-navigation/drawer from a test application
Steps To Reproduce
Expected Results
Screens should not be unmounted when navigating away or rendering different screens. Screens should also not be remounted under same circumstances. Screen rendering should be equivelent to processes used by android/ios platforms (other RN supported platforms) at least in functionality.
CLI version
10.2.0
Environment
Target Platform Version
None
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
https://github.com/acaininet/BreakingBugRNWNavigation0323