Skip to content

DeMoorJasper/react-loadaable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Loadaable

An edit on react-loadable that is not bound to webpack...

Usage

import Loadable from 'react-loadaable'

export default Loadable({
  loader: () => import('../components/something-big'),
  loading: () => <FullBlockLoader loader={CircleLoader} />,
  ssr: () => {
    if (process.env.TARGET !== 'web') {
      return require('../components/something-big').default
    }
  }
})

About

⏳ A higher order component for loading components with promises.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%