Tuesday, 30 October, 2018 UTC


A new way of doing code-splitting in React apps has been released in [React v16.6.0](https://reactjs.org/blog/2018/10/23/react-v-16-6.html). It allows us to use `Suspense` tag with dynamic `import` statements to send heavy components over the wire to the user when they are needed and not before. In this example we are going to see how to use React.lazy and Suspense to avoid sending whole of lodash and moment JS libraries and instead do it once it's actually necessary.