Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!