4 ms·
> only the app was designed around dependencies being available first before other code is run I'm not sure I follow – isn't that the definition of 'dependency
by rich_harris 10y ago
> only the app was designed around dependencies being available first before other code is run
I'm not sure I follow – isn't that the definition of 'dependency'?
> If you have 100 dependencies that means you have 100 HTTP requests, which is really a poor design decision
Agree – and it turns out that's still the case with HTTP2. But bundling doesn't solve the problem of await blocking your app, unfortunately.
- jameslk 10y agoSome of the "other code" may not depend on the dependency. I think the word dependency may have been confusing in my statement. Await doesn't actually block the entire app (or JS thread) like synchronous code does. It schedules the code that follows after an await in the same file or in an async function to run later. You probably already understand this, but my point is that other code outside of this context is free to continue running.