Skip to content

Navigation.events().registerComponentDidAppearListener doesn't work in RN 0.66 #7315

@meDev-lab

Description

@meDev-lab

🐛 Bug Report

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. Upgrade react-native from 0.63.0 to 0.66.0 and react-native-navigation from 7.16.0 to 7.23, and run on Android emulator
  2. After load app i should was alert() , but i didn't saw anything

Expected behavior

After load app should work Navigation.events().registerComponentDidAppearListener and we will be get alert()

Actual Behavior

In preview versions (RN 0.63.0) this code work fine, but after upgrade RN to 0.66 version he is broken (no error, no warning - just not work)

Navigation.events().registerComponentDidAppearListener(() => {
    alert(componentId);
    // getData();
  });

He should make alert, after we open this modal component,

image

Also i tried this lib react-native-navigation-hooks but also to no avail (

Your Environment

  • React Native Navigation version: 7.23.1
  • React Native version: 0.66.0
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Any Simulator with Android >25

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions