0.1.7 • Published 7 years ago

creasync v0.1.7

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Creasync Build Status Dependency Status

Asynchronous route and component for react.

Using webpack chunking, the imported component's chunk will be automatically be created. With this, We can also implement the lazy loading component and error component.

Methods

The creasync method accepts an object.

component - component path.

error - error component to be rendered.

loading - loading component to be rendered.

Sample

import creasync from 'creasync'

const NewComponent = creasync({
    component: System.import('url-to-component'),
    error: () => (<div>Something went wrong...</div>),
    loading: () => (<div>loading component...</div>)
})

Examples

See the examples directory.

run the server

npm run examples:serve

then run webpack

npm run examples:webpack

Disclaimer

Work in progress

0.1.7

7 years ago

0.1.5

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago