1.6.0 • Published 4 years ago
react-lazy-pro v1.6.0
How to use
Install and use this package
Basic intruction for installation
npm i react-lazy-proThis custom function only for
React.jsThis is the pro version on
React.lazy()- All
React.lazy()condition apply here
import delayload from "react-lazy-pro";const LazyComponent = delayload(import("./Other"), 2000);
const App = () => {
return (
<Suspense fallback={null}>
<LazyComponent />
</Suspense>
);
};How That's Work
- where
Component Your Component - where
delay -> Time for rendering component
default delay :300ms (millisecond)const delayload: (Component: module, delay: Number);