score:2

Accepted answer

According to the documentation,

Tree-shaking of Material-UI works out of the box in modern frameworks. Material-UI exposes its full API on the top-level @material-ui import.

Which means importing exactly what you're using will not result into the inclusion of other parts of @material-ui/ in your production build.

Note all of their examples import only the bits used in that particular example, so figuring out what your project needs for each case should not be difficult. Besides, whenever you're missing something, you'll get a descriptive error message about it, telling you exactly what you missed.


Related Query

More Query from same tag