An open API service indexing awesome lists of open source software.

https://github.com/js2me/react-simple-loadable

Really simple React Loadable component
https://github.com/js2me/react-simple-loadable

Last synced: 12 months ago
JSON representation

Really simple React Loadable component

Awesome Lists containing this project

README

          

# React Simple Loadable HOC

This is simple loadable component based on Class React Component

## Usage

```tsx
import { loadable } from "react-simple-loadable";

loadable(async () => {
return (await import('./your-component')).YourNamedComponent
},
SkeletonComponent
)
```

```tsx
import { loadable } from "react-simple-loadable";

loadable(async () => {
return (await import('./your-component')).YourNamedComponent
},{
loader: SkeletonComponent,
extra: () =>

renders with the lazy component

})
```