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

141
Visualizações
Split an existing react application to ship only a selected part of features

I have a react application which is capable to create and manage 4 different type of config files.
Each with their on set of keys and possible values.

in my App.jsx I have a custom layout component with header, side navigation, footer and a <Switch> defined from react-router-dom with different Routes to the corresponding overview and editor pages for the different config files. As well as some routes to more general pages like /home or /404. The <Switch> defines which content gets rendered in the body of the layout component.

A potential client wants to use the application but needs only to manage 2 config files of the 4 available.

I'm looking for an elegant way to introduce some sort of properties file into the application in which I can configure which sites are available and which are not.
I want to avoid copying the existing codebase and deleting everything I don't need for the client, resulting in me being forced to apply bugfixes or patches on two repos/codebases.

One approach would be to introduce conditional rendering to the different navigation links and introduce a custom hook which redirects to /404 when trying to access a disabled site. But I feel this approach can get messy quick and scales bad.

I'm looking for guides, tutorials, experiences or ideas on how to split up and ship parts of an existing react application.

Thanks in advance :)
If this is not the right place to ask, please redirect me in the right direction

about 4 years ago · Santiago Gelvez
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