Using Dynamic Imports

Learn how you can drastically improve the performance of your app by avoiding unnecessary loading codes on the initial run or for immediate use.

Dynamic import syntax

Dynamic import syntax is an extension of this syntax and allows us to dynamically lazy-load imports. Dynamic imports are similar to a Promise:

// greeter.js
export sayHi = (name) => `Hi ${name}!`;

//
...