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

470
Vistas
Configuring React Navigation on web: hiding bottom tab bar based on platform

Looking for general advice on best practices for adapting React Navigation for web. I would like to move the bottom tabs(in native) to the top(on web) for instance? What's a good approach for doing that? Is there a way to hide/show/change navigation based on platform?

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

0

Turned out to be easier than I thought. Thank you @Drew Reese

If the following is your root navigator for instance -:

function RootNavigator() {

  return (
    <Stack.Navigator>
        <Stack.Screen name="authNav" component={AuthNavigator} />
        <Stack.Screen name="main" component={MainNavigator} />
    </Stack.Navigator>
  );
}

If you'd like for your web app to load the main navigator as a sidebar, and for your natives to load the main navigator as a bottom navigator, for example, create a bottom tabs navigator in MainNavigator.native.js and a sidebar(drawer navigator with drawerType set to permanent) in MainNavigator.js.

Even the import remains that same. Efficient!

import MainNavigator from './MainNavigator'

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can accomplish this in at least two different ways, though I think the better one is with media queries.

Media queries

One way to do that is with Media Queries, where you basically check against screen sizes.

You can render conditionally for current screen size being in a particular range, or smaller or larger than a particular size.

Here is a Guide to Media Queries from CSS Tricks

I'll abbreviate with xs, sm,md,lg,xl for certain sizes (extra-small, small, medium, large, extra-large).

In your scenario

So basically, you can then render the tabs (or any UI element, really) or hide them, or apply css conditionally.

User Agent

Another way you could do this is with the User Agent.

You could check for platform specific strings such as Android, iPhone, iPad, Macintosh etc.

const { userAgent } = window.navigator

console.log(userAgent)
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