3
Hey, you guys
How does React dependency/library management work? Do you have a page in the documentation that talks about? Importing a library that has, for the most part, things that I won’t use (i.e., that I use a few things from the library) makes my project heavier?
--
Explaining in more detail and with example:
Let’s assume you’re using UI material in my project. This library has many UI elements of Material Design. But I will only use, for example, Buttons and cards.
Is the fact that I am only using two things from a library that has several other elements bad for the performance of my project? Is React smart enough to upload to my project just what I’m going to use? That is, React carries, in this situation, only the elements that I will use, or it carries the entire lib?
DOUBT 2, BUT FOLLOWING THE THOUGHT OF THE PREVIOUS QUESTIONING
In the example of the import of icons of the Material-UI there is a difference for React when importing the following ways:
import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';
import { AccessAlarm } from '@material-ui/icons';
I don’t know if I was redundant or clear enough. Any further questions, I’m available.