# react-lazy-load-with-retries

> If the file cannot be downloaded during navigation due to an error or network issue, the app may crash as React.lazy fails to import the component. To handle this situation gracefully, it's important to implement proper error handling and retry mechanisms

Latest version **0.0.2** (published 2023-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-lazy-load-with-retries
pnpm add react-lazy-load-with-retries
yarn add react-lazy-load-with-retries
bun add react-lazy-load-with-retries
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-04-20 |
| First published | 2023-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | JustinNguyen |
| Maintainers | justinnguyen97hust |
| Keywords | react, lazyLoad, lazy-load, js, ts |

## Links

- npm: https://www.npmjs.com/package/react-lazy-load-with-retries
- Repository: https://github.com/hungnv1997/lazyLoadWithRetry
- Homepage: https://github.com/hungnv1997/lazyLoadWithRetry#readme
- Issues: https://github.com/hungnv1997/lazyLoadWithRetry/issues
- npm.io page: https://npm.io/package/react-lazy-load-with-retries

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.2 (latest) — 2023-04-20
- 0.0.1 — 2023-04-19

## README

# lazyLoadWithRetry
If the file cannot be downloaded during navigation due to an error or network issue, the app may crash as React.lazy fails to import the component. To handle this situation gracefully, it's important to implement proper error handling and retry mechanisms to ensure smooth performance of the application. [react-lazy-load-with-retries](https://www.npmjs.com/package/react-lazy-load-with-retries) will help you fix this issue. 


![react-lazy-load-with-retries](https://user-images.githubusercontent.com/46401220/233241220-6e741c3d-9865-49f9-abf5-5422c330dd61.gif)

## Usage
```js
npm i react-lazy-load-with-retries
```

```js
import { Suspense } from 'react';
import { lazyLoadWithRetries } from 'react-lazy-load-with-retries';

function App() {
    const MyButton = lazyLoadWithRetries(()=> import('./lib/MyButton'))
    return (
        <>
            <Suspense fallback="<div>Loading</div>">
            <MyButton/>
            </Suspense>
        </>
    );
}


export default App;
```
## Authors

- [@justinNguyen97](https://github.com/hungnv1997)


## Badges


[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/react-lazy-load-with-retries · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
