Комментарии:
why so m any 'adming' typo in there -_
ОтветитьGreat tutorial! I immediately starting using dynamic module importing in my work project after watching this. Thank you!
ОтветитьFragmentJS uses the term WYNWYG or simply means, What You Need is What You Got. But they I mean me, still not satisfied, so I change it to, WYNWGLUWS or What You Need is What You Got Later Until We are Sure. 😂
ОтветитьYour explanation for the translation example just blow my mind! Thank you so much Kyle, always delivering good explanation
Ответитьwhat the difference between this and react.lazy ?
they both used to avoid immediately importing a component but what the diff ?
Only one note, and that's just that the abbreviation for Spanish is "es", as in "España", not "sp"
Ответитьproblm here with translations is that console .log is function scoped....i need the trnaslations globally
Ответитьvery clear explanation and easy to understand with sample. thx.
ОтветитьNice!
ОтветитьBut what if whichever file we imported as request is getting used in another component as well, there we will do import request again? Then better be it in bundler itself
Ответить❤
ОтветитьУжасно.
ОтветитьRight, but wouldn't that slow down the app after the initial load? I mean, when you don't use dynamic imports, everything is imported after the initial page load - all the components and dependencies. This, of course, can make the initial load slower, but the browser won't have to download anything else after that. With dynamic imports, you're reducing the time of the initial page load, but at the cost of downloading each component when it is needed later, effectively decreasing the responsiveness of your app. Am I correct?
Ответитьcould someone help me figure out why code gives me an "node_modules/chalk/source/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules."
I'm on v5 of chalk which supports ESM, but I don't know how to configure my project to get it to work....
"type": module would still give an error :(
What is that "adming" thing that Kyle constantly wants to write instead of "admin"? Is it secret marketing for a new product? :)
Ответить謝謝分享!!
Ответитьthanks
ОтветитьOne drawback of dynamic import is that Tree shaking is not possible so if you are loading big module, bundler will load all exports from the module. But yes we can eliminate loading of unnecessary modules. That's a big benefit.
Ответитьdoes async works in forEach? I thought it only works in for loop
Ответить