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

259
Visualizações
Is it possible to have React multi-page application while having fastapi as the backend routing each page and sending data as jinja templates

I'm working on a project where we are using vanilla javascript, Html and css for frontend while designing the backend in the FastAPI. The way backend connects with the frontend is using Templates, by adding the file name for a particular page and also sending the data as jinja template back to the client side. We have five pages and all are declared in the backend as get requests and we are using a specific html file for loading a particular page. So, there are mainly five html files for five pages Now, I was deciding to switch to reactjs as the frontend, however, react being the single page application and also just having the Routes for multiple pages, I'm wondering how to I connect it to the backend and also send data back to the client, the way I was doing it before. I tried to look for answers, couldn't find one as of now... And also I'm kind of new to Reactjs

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

React, Python, and FastAPI are all great technologies that I too use. But they work more effectively when used for their intended purposes. A hammer is a great tool if you need to pound in some nails, but it's a lousy tool for other purposes such as trying to use it as an eating utensil. So you'd be well advised, if you are going to use React and FastAPI, to use them as they were intended.

Jinja templates are used for server side rendering. But React is (in essence) also a server side rendering system. Both of them will not play nicely together, at least not without more work and complexity.

Instead you'd be better off committing to either the Jinja templating or React. If you choose Jinja, you figure out what the page will be (render) before sending it off to the client. If you choose React, you write the user-visible application, send that off to the client, and then the application on the client's browser fetches data through (usually JSON) APIs from the FastAPI back end.

over 4 years ago · Santiago Trujillo 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