4 ms·
There are different ways to do it based on the transpiler you use. With Webpack and dynamic imports, you could create a custom loader around the promises return
by djhalon 8y ago
There are different ways to do it based on the transpiler you use. With Webpack and dynamic imports, you could create a custom loader around the promises returned by the Webpack generation.
For React, you can use React Loadable (https://github.com/jamiebuilds/react-loadable https://github.com/jamiebuilds/react-loadable) that provides a Higher Order Component and Server Side rendering.