Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda