3 ms·
That’s not really relevant, right? No mater the loading/transpiration step, you lose a lot of language guarantees when you can load multiple of the same package
by parhamn 7y ago
That’s not really relevant, right? No mater the loading/transpiration step, you lose a lot of language guarantees when you can load multiple of the same packages, including:
- function/object identity checking I.e “package.func !== package.func” in many cases places.
- module level singletons and registry (e.g createContext useContext)
- single initialization
- others I can’t think of
That’s not typical and I was surprised by it.
- jessaustin 7y agoLoading multiple versions of the same package is just something that you can do in javascript. As complained about many other times ITT, any big node tool does this as a matter of course. Over on the browser, react isn't my favorite, but I'll admit that all that complexity serves some purpose. Maybe it would be nice if it were just a bit more complex so that global contexts could be backwards-compatible, but I guess it's not. Still, if you hire developers, they should be able to handle this sort of thing.