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

106
Vistas
ReactJS Prevent Navbar from rendering on certain components

I'm trying to create a web app. The app has a Home page, About, FAQ & Grow page. The Navbar will render on the pages above. I do not want it to render on my authentication pages - Login & Register Here is my Index.js:

ReactDOM.render(
  <>
    <Router>
      <App />
      <Route exact path="/register" component={Register} />
    </Router>
  </>,
  document.getElementById("root")
);

); Here is my App.js:

function App() {
  return (
    <>
      <Nav />
      <Route exact path="/" component={Home} />
      <Route exact path="/about" component={About} />
      <Route exact path="/faq" component={FAQs} />
    </>
  );
}

export default App;

How do I render the Nav component on the home page, about and FAQ page and not on my Authentication pages

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

0

The easiest and viable option is to include the Nav on each of the components that needs it. i.e. Put it inside Home, about and faq pages respectively.

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