Skip to content

Android (11,12,13) - ComponentDidDisappear doesn't invoke when user change tab & bottomTabs.visible=false #7705

@retyui

Description

@retyui

What happened?

Navigation.events().registerComponentDidDisappearListener(event => {
   // event doesn't invoke on Android 13,12,11  :( when user jump between tabs 
})

I found out that Navigation.setDefaultOptions({bottomTabs: {visible: false},}); trigger this behavior

when visible:true then listener invoked as expected :(

Demo Android 13 (no disappear event):

android.mp4

Demo Android 10 (works well):

10.mp4

Demo iOS:

Screen.Recording.2023-04-29.at.12.50.53.mov

What was the expected behaviour?

event should work the same as iOS and old Android versions

Was it tested on latest react-native-navigation?

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

Help us reproduce this issue!

git clone https://github.com/retyui/wix-react-native-navigation-issues-7705
cd wix-react-native-navigation-issues-7705
yarn
yarn start 
yarn android # use Android 13,12,11

then in index.js:

Navigation.setDefaultOptions({
  bottomTabs: {
    visible: false, // <-- Change value to see differences (of invoking Appear/Disappear events)
  },
});

In what environment did this happen?

React Native Navigation version: 7.33.0-alpha.3 + 7.30.3
React Native version: 0.70.6
Has Fabric (React Native's new rendering system) enabled: no
Node version: 16
Device model: pixel 7 pro
Android version: 13

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions