react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

fix: android onDropViewInstance not invoked when page popped

Open NormanWangEndeavor opened this issue 1 year ago • 2 comments

What happened?

The onDropViewInstance of ViewManager is not called anymore when a screen is popped from the stack, since RN version 0.71.x.

What was the expected behavior?

The onDropViewInstance of ViewManager should be called.

Was it tested on the latest react-native-navigation?

I have tested this issue on the latest react-native-navigation release and it still reproduces.

Root Cause

The unmountReactApplication removes all children from RN version 0.71.x which causes the onDropViewInstance not to be called. Adding these removed children back resolves the problem.

In what environment did this happen?

React Native Navigation version: - React Native version: since 0.71.x Has Fabric (React Native's new rendering system) enabled: no Node version: - Device model: - Android version: -

related issue: https://github.com/wix/react-native-navigation/issues/7852

NormanWangEndeavor avatar Sep 30 '24 02:09 NormanWangEndeavor

@NormanWangEndeavor Thank you for the quick turnaround. @mobileoss @Niryo @asafkorem I confirm, we can merge this which will resolve #7852

maheshwaripurvesh avatar Sep 30 '24 21:09 maheshwaripurvesh

@d4vidi / @gosha212 can you please review this?

asafkorem avatar Oct 16 '24 14:10 asafkorem

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 31 '25 22:01 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Feb 24 '25 23:02 stale[bot]