wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.01k stars 2.68k forks source link

Fix clearing props on setRoot #7824

Closed yogevbd closed 5 months ago

yogevbd commented 6 months ago

When setting a new root component with the same componentId, the new root was mounted before the last one was destroyed. That caused a race condition where the new root component props got cleaned from the store before the new one consumed it. The solution is to destroy the last root before mounting the new one and presenting a screenshot during this transition in order to avoid white screen.