Installing react-aria via mono package or individual package #5044
-
As stated in the title, what's the benefit of installing via mono package and individual package? From bundlephobia, the package does have tree shaking, but I heard that (not sure if I'm correct) tree shaking only occurs in build time; thus making dev mode (for mono package) slower due to the need of importing every module. Is this true? If so, is there any benefits of mono package other than making the import easier to read? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The biggest benefits would be that you don't need to remember where all the different exports are from and you wouldn't need to manage the versions yourself. We've found that trying to manage them yourself can easily lead to duplicates being installed, which would lead at best to a bloat in your production code and at worst, crashes. I think this easily outweighs any large sizes during dev mode. I've not noticed this as an issue since network requests are local, so speeds for "downloads" are very high. ;) The reason we have all the different package versions is so that if a bug is introduced or a problem is found, teams have ways of isolating particular changes. We also use them to try out pre-release code. It is not something we really envisioned being a long term situation. More of an advanced if needed use case. |
Beta Was this translation helpful? Give feedback.
The biggest benefits would be that you don't need to remember where all the different exports are from and you wouldn't need to manage the versions yourself. We've found that trying to manage them yourself can easily lead to duplicates being installed, which would lead at best to a bloat in your production code and at worst, crashes.
I think this easily outweighs any large sizes during dev mode. I've not noticed this as an issue since network requests are local, so speeds for "downloads" are very high. ;)
The reason we have all the different package versions is so that if a bug is introduced or a problem is found, teams have ways of isolating particular changes. We also use them to try ou…