0
Import VS require ?
Can someone please explain to me what's the major difference between import and require
3 Respostas
+ 2
Dynamic import is ES2020 feature with import() operator, it is asynchronous and it returns a promise.
You can import in the code blocks instead of globally, and use
.then
.catch
.final
or async await to handle the resolve and reject of the promise.
+ 1
Thank you soo much for this article it really helped but i have a follow up questions what's a dynamic import what's tree shaking
0
Thank you so much