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

101
Vistas
Is there any benefit of getting navigation prop using useNavigation hook in React Native?

Im now working on the project where they get navigation prop ONLY using useNavigation(), even if it is available in components prop and same with route, is there any benefit?

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

0

No, there isn't any benefit to use the useNavigation hook as the default method for accessing the navigation prop and I personally would strongly advise against it. The official documentation is very clear on when to use the useNavigation hook.

useNavigation is a hook which gives access to navigation object. It's useful when you cannot pass the navigation prop into the component directly, or don't want to pass it in case of a deeply nested child.

If the component is defined as a Screen in the Navigator and the navigation prop is passed by it to the screen anyway, we should not create a dependency to a hook which we do not need.

We could even pass the navigation prop from the parent to its children if the children need it. Thus, there is no general need to use useNavigation at all and certainly not as the default method.

However, in some cases it is very inconvenient to pass the navigation prop very deep. That is why useNavigation exists.

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