Retry dynamic imports with Lazy react

Read this article to understand the details

Usage

const LazyAbout = LazyReact(() => import("./components/About"));
const LazyHome = LazyReact(() => import("./components/Home"));

const App = () => (
  <Router>
    <Suspense fallback={<div>Loading...</div>}>
      <Routes>
        <Route path="/" element={<LazyHome />} />
        <Route path="/about" element={<LazyAbout />} />
      </Routes>
    </Suspense>
  </Router>
);

Working module

you can find an npm module here by @fatso83 https://github.com/fatso83/retry-dynamic-import