3 ms·
Only one function as a module, Seriously? There are 10 modules that you need to imports if you are using 10 functions. I think it's unnecesary
by peeyek 10y ago
Only one function as a module, Seriously?
There are 10 modules that you need to imports if you are using 10 functions. I think it's unnecesary
- joelg 10y agoAnd it would be. The use case is when you need one function and want as small an import as possible.
- fvargas 10y agoJavaScript has always been uniquely tied to the web, where page load times matter and serving a bunch of unnecessary data to a user can have a significantly negative impact. I think there is a balance to be struck with how we architect our libraries. In fact, ES6 module imports already go a long way in addressing these issues. Take a look at http://rollupjs.org http://rollupjs.org for how efficient module bundling can be done through the use of ES6
- deleted 10y ago[deleted]
- kchoudhu 10y agoApparently you missed the leftpad drama a couple of months ago. (It was ridiculous then, and it is ridiculous now)