DEV Community

Discussion on: The new features of Javascript in 2020 (ES11)

Collapse
 
pentacular profile image
pentacular

I think it's worth noting that your dynamic import example relies on top-level await.

let Dmodule;
if ("react") {
  Dmodule = await import('react')
} else {
  Dmodule = await import('vue')
}

I think this is still a proposal isn't it?

Anyhow, probably worth-while not complicating your example with it. :)

Collapse
 
aryclenio profile image
Ary Barros

Hy pentacular. Thanks for the reply and I agree with you. I've changed the example so it better fit the main explanation.