DEV Community

Vishnu Priya S
Vishnu Priya S

Posted on

lazy , suspense

Lazy:

It actually prevent from the initially download and the component should be loaded when the component is needed.

lazy syntax:

const About = lazy(() => import('./About'));

Suspense:
This when the component gets loaded on that time it displays a fallback "Loading..." has temporarily.

suspense syntax:
Loading...}>

Top comments (0)