I've been working with NodeJS for a while now. I got doubt while optimizing my code that would it be better if I import only required functions in my script or wouldn't it bring any difference in importing the whole module. Also, would creating an instance of axios in my React app and then using it elsewhere would have the same effect importing it in every single file?
Also I'd like to know what happens to the used functions when the scripts are compiled? Is the script optimized to a single function or a tree of depending functions?
Maybe the difference would be insignificant but I'd still like to know the which ones the efficient one.