maifeeulasad/react-pipeline

code splitting

Closed this issue · 0 comments

import React, { Suspense, lazy } from 'react';

const SomeComponent = lazy(() => import('./path/to/some/component'));

<Suspense fallback={<div>Loading...</div>}>
        <SomeComponent />
</Suspense>