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

196
Visualizações
In a React App, are only imported functions counted towards the size / overhead of the APP for the user?

For example, my React APP depends on MUI package.

But I only import the Slider and AutoComplete from the package.

Will only these 2 components have an effect on my APP in terms of performance to the end user? Or does the entire package have the same effect regardless just because it is a dependency?

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

0

Webpack (shipped with create-react-app) makes sure that imports like that are transformed in production to minimise bundle size.

However, this is not the case in development. Without custom babel config, you will import the entire library and your app will take forever to start in development mode. The Mui docs has a section on how to deal with that, but it's a little outdated wrt/ create-react-app. Nowadays craco exists that makes this whole process a lot easier. But if you can't be bothered to learn yet another CRA anti-eject library, you can follow Mui's tutorial and get the exact same result, just less future-proof.

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