wix / wix/react-native-navigation

Root component Appear not working in first time after launch

Open
#8,265 2 comments 0 reactions 0 assignees View on GitHub

@markdevocht is already working on this.

Since May 6, 2026.

  • #8295 by @markdevocht — open
🏚 stale platform: Android type: accepted/bug
Dominant language
MDX
Stars
13.2k
Forks
2.6k
Avg merge
6d 2h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing open pull request #8295 and the bindComponent flow described in this issue. Trace how AppState.addEventListener('change', ...) and handleAppStateChange lead to componentDidAppear for a root screen on first launch. Done means componentDidAppear is reliably delivered after the root component is mounted on initial launch, with the relevant behavior covered by the project's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.