Skip to content

Root component Appear not working in first time after launch #8265

Description

@manoj-mehra-spraxa

What happened?

Root component Appear not working in first time after launch

Root cause: AppState.addEventListener('change', ...) only fires on changes — not the initial state. On first launch the app is already 'active', so no change event fires. handleAppStateChange (which calls componentDidAppear()) never runs.

RNN's bindComponent should handle this, but for root screens RNN sometimes fires componentDidAppear before the component is fully mounted, causing it to be missed.

What was the expected behaviour?

No response

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!

Root cause: AppState.addEventListener('change', ...) only fires on changes — not the initial state. On first launch the app is already 'active', so no change event fires. handleAppStateChange (which calls componentDidAppear()) never runs.

RNN's bindComponent should handle this, but for root screens RNN sometimes fires componentDidAppear before the component is fully mounted, causing it to be missed.

In what environment did this happen?

React Native Navigation version:
React Native version: 0.84
Has Fabric (React Native's new rendering system) enabled: (yes/no) yes
Node version: 24
Device model: sumsung : SM M325F
Android version: 14

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions