Root component Appear not working in first time after launch

Abierto
#8,265 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #8295 de @markdevocht — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, react-native
Área
mobile

Línea de trabajo

Comienza revisando el pull request abierto #8295 y el flujo de bindComponent descrito en este issue. Traza cómo AppState.addEventListener('change', ...) y handleAppStateChange conducen a componentDidAppear para una pantalla raíz en el primer inicio. Se considera completado cuando componentDidAppear se entrega de forma fiable después de montar el componente raíz en el inicio inicial, con el comportamiento relevante cubierto por las pruebas del proyecto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

🏚 stale platform: Android type: accepted/bug
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

Lenguaje dominante
MDX
Estrellas
13.2k
Forks
2.6k
Merge medio
2 d 10 h
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wix/react-native-navigation

Todos los issues de wix/react-native-navigation

Issues similares

Más issues de Mobile Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.