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

257
Visualizações
React-Router: Force reload in browser

We have a monolithic react SPA deployed with AWS Cloudfront. We are trying out microsite architecture where each route/path in the react app will be built and deployed as a standalone app. To achieve this we have configured path-based behaviors in Cloudfront to route the request to the respective origin which works fine.

Due to its SPA nature, all the routes defined in the monolithic react app tries to load pages without sending a request to the server. This is causing issues because we want a few routes to be loaded from the server so that CloudFront can route the requests properly.

How can we force react-router to load a specific route from the server?

<Route exact path="/example" render={()=>console.log("load from server?");} />

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Well, react-router routing happens at client level, so you don't have to use it to get server-rendered pages.

What you need is just an a tag, like

<a href="/example" alt="A page you want to load">Label</a>
about 4 years ago · Juan Pablo Isaza Relatório
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