Code splitting and lazy loading for faster load times.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
export const ReactLazyPreload = (importStatement) =>
|
||||
{
|
||||
const Component = React.lazy(importStatement);
|
||||
|
||||
Component.preload = importStatement;
|
||||
|
||||
return Component;
|
||||
};
|
||||
Reference in New Issue
Block a user