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

127
Vistas
React routing. Positioning components on different pages

There is a page https://stackblitz.com/edit/react-fjya8s?file=src%2Fcomponents%2FHeader.jsx. It is necessary that the component Accaunt be located on a different page (not on the one on which the Enter component is located (i.e. it should be like on https://metanit.com/web/react/4.1.php) - i.e. the components must be located on different pages ). Tell me how to achieve this.

To achieve the goal, I used the Route tag from library react-router-dom with attributes path and component. I used

const Header = () => {
  return (
    <>
      <Router>
        <Route exact path="/" component={Enter}></Route>

        <Route path="/Accaunt" component={Accaunt}></Route>
      </Router>
    </>
  );
};

but the Accaunt component is on the same page (visually) as the Enter component.

I am interested in various ways to solve the problem as I am a newbie. I accept any solution to the problem.

about 4 years ago · Juan Pablo Isaza
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