Skip to content

lakerswgq/react-loadable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-loadable

naive react loadable

Install

yarn add @tfboys/loadable

Example

import Loadable from '@tfboys/loadable';

const LazyLoading = loadable({
    loader: () => {
        return new Promise((resolve, reject) => {
            // wait 2 seconds
            setTimeout(() => {
                resolve(import('./route/lazy-loading'))
            }, 2000);
        })
    },
    loading: () => { return 'loading' },
})

export default class App extends React.Component {
  render() {
    return <LazyLoading/>;
  }
}

About

naive react loadable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published