# load-async

> Load React components asynchronously

Latest version **1.0.0** (published 2017-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install load-async
pnpm add load-async
yarn add load-async
bun add load-async
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-08-18 |
| First published | 2017-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Fernando Daciuk - @fdaciuk |
| Maintainers | fdaciuk |

## Links

- npm: https://www.npmjs.com/package/load-async
- Repository: https://github.com/fdaciuk/load-async
- Homepage: https://github.com/fdaciuk/load-async#readme
- Issues: https://github.com/fdaciuk/load-async/issues
- npm.io page: https://npm.io/package/load-async

## Recent versions

- 1.0.0 (latest) — 2017-08-18
- 0.0.2 — 2017-08-18
- 0.0.1 — 2017-08-18
- 0.0.0 — 2017-08-18

## README

# Load Async

> Load React components asynchronously

## Installation

```console
yarn add load-async
```

or using NPM:

```console
npm i --save load-async
```

## Configuration

Add the `load-async/src` path on JS loader, inside the webpack config file.

## Usage

```js
import loadAsync from 'load-async'

const ContentAsync = loadAsync(import('./content'))

const App = () => (
  // will load a div until the component is ready
  <ContentAsync />
)
```

You can use `children` if you want to:

```js
import loadAsync from 'load-async'
import Header from './header'

const MainAsync = loadAsync(import('./main'))

const App = () => (
  <MainAsync>
    <Header />
  </MainAsync>
)
```

## License

[MIT](https://github.com/fdaciuk/licenses/blob/master/MIT-LICENSE.md) &copy; Fernando Daciuk

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