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

[Android | iOS] componentDidDisappear's performance is inconsistent in Android and iOS when App slides to background #7841

Open YadongChen opened 5 months ago

YadongChen commented 5 months ago

What happened?

(1)Use the code of the current main branch and run it using the example in the playground

(2)Slide the Playground App to the background:AppState.active => AppState.background,Then return to active state:AppState.background => AppState.active

(3)For iOS:No Screen Lifecycle will be triggered

(4)For Android:componentDidDisappear will be triggered

  1. AppState.active => AppState.background:

    • componentDidDisappear: Component2
  2. AppState.background => AppState.active:

    • componentWillAppear: Component2
    • componentDidAppear: Component2

What was the expected behaviour?

Inconsistent behavior in Android and iOS, is this the intended design?

I didn't find the relevant documentation description or related issue. I'm not sure if it is a problem?

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: 7.37.2 React Native version: 0.72.3 Has Fabric (React Native's new rendering system) enabled: (yes/no) no Node version:v20.10.0