Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

305
Vistas
React Native - How to get initial navigation state in React Navigation

I'm trying to get initial state in the same format as onStateChange prop provides in NavigationContainer. onStateChange doesn't fire on initial render. In the example below, I managed to get state when navigating between screens, but not on the first one. Any ideas?

export default function App() {
  const [pageState, setPageState] = React.useState();

  return (
    <NavigationContainer onStateChange={(state) => setPageState(state)}>
      <RootNavigation />
    </NavigationContainer>
  );
}

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try using the onReady method from the NavigationContainer From the docs: https://reactnavigation.org/docs/navigation-container#onready

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda