0.0.8 • Published 6 years ago

with-async-component v0.0.8

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

withAsync

No-frills HOC to asynchronously load React components for code-splitting purposes.

import { withAsync } from 'with-async-component'

const getComponent = () => import('./App')

const LoadingOverlay = props => props.loading ? <div>Loading...</div> : props.children

const App = withAsync(LoadingOverlay)(getComponent)
0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago