mirror of
https://github.com/gregberge/loadable-components.git
synced 2026-01-18 15:12:26 +00:00
- Add a new `render` method to use render props pattern - Fix all issues with SSR BREAKING CHANGE: loadable-components/babel is now required if you do server side rendering. BREAKING CHANGE: ErrorComponent now receive `ownProps` instead of `props`.
13 lines
209 B
JavaScript
13 lines
209 B
JavaScript
import React from 'react'
|
|
import loadable from 'loadable-components'
|
|
|
|
const AsyncWhat = loadable(() => import('./What.js'))
|
|
|
|
const App = () => (
|
|
<div>
|
|
Hello <AsyncWhat />!
|
|
</div>
|
|
)
|
|
|
|
export default App
|