Skip to content

js2me/react-simple-loadable

Repository files navigation

React Simple Loadable HOC

This is simple loadable component based on Class React Component

Usage

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

loadable(async () => {
  return (await import('./your-component')).YourNamedComponent
}, 
  SkeletonComponent
)
import { loadable } from "react-simple-loadable";

loadable(async () => {
  return (await import('./your-component')).YourNamedComponent
},{
  loader: SkeletonComponent,
  extra: () => <div>renders with the lazy component</div>
})

About

Really simple React Loadable component

Resources

License

Stars

Watchers

Forks

Packages

No packages published