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
- Host: GitHub
- URL: https://github.com/js2me/react-simple-loadable
- Owner: js2me
- License: mit
- Created: 2024-11-24T16:08:55.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-20T05:28:50.000Z (12 months ago)
- Last Synced: 2025-06-20T05:35:50.271Z (12 months ago)
- Language: TypeScript
- Size: 144 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
})
```