justinsisley / mercenary

The force multiplier web app stack
3 stars 2 forks source link

Remove react-async-component? #46

Closed justinsisley closed 7 years ago

justinsisley commented 7 years ago

From: https://facebook.github.io/react/blog/2017/05/18/whats-new-in-create-react-app.html

It is important to keep the initial JavaScript payload of web apps down to the minimum, and load the rest of the code on demand. Although Create React App supported code splitting using require.ensure() since the first release, it used a webpack-specific syntax that did not work in Jest or other environments.

In this release, we are adding support for the dynamic import() proposal which aligns with the future web standards. Unlike require.ensure(), it doesn't break Jest tests, and should eventually become a part of JavaScript. We encourage you to use import() to delay loading the code for non-critical component subtrees until you need to render them.

cra-dynamic-import

justinsisley commented 7 years ago

Added support for async/await. react-async-component still works better for general use than await import('...').