React.lazy, What and how to use in your app

added by JavaScript Kicks
10/24/2018 2:30:31 PM

664 Views

React 16.6 is out and with it comes the new Lazy API. The Rreact.lazy function lets you render a dynamic import as a regular component. React.lazy takes a function that must call a dynamic import(). This must return a Promise which resolves to a module with a default export containing a React component.


0 comments