You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loadable Components is Hot Reload friendly, it works out of the box with [React Hot Loader](https://github.com/gaearon/react-hot-loader) without adding a single line of code. All components are loaded when a reload occurs, if you want to disable this behaviour, you can set a global config:
346
-
347
-
```js
348
-
import { setConfig } from'loadable-components'
349
-
350
-
// Disable automatic "load" of components
351
-
setConfig({ hotReload:false })
352
-
```
345
+
Loadable Components is Hot Reload friendly, it works out of the box with [React Hot Loader](https://github.com/gaearon/react-hot-loader).
353
346
354
347
## API Reference
355
348
@@ -359,15 +352,15 @@ This is the default export. It's a factory used to create a loadable component.
359
352
360
353
### Arguments
361
354
362
-
1.`getComponent`_(Function)_: Function to load component asynchronously.
363
-
2.`options`_(Object)_: Facultative options to configure component behavior.
355
+
1.`getComponent`_(Function)_: Function to load component asynchronously.
356
+
2.`options`_(Object)_: Facultative options to configure component behavior.
364
357
365
358
### options
366
359
367
-
1.`ErrorComponent`_(ReactComponent)_: Component rendered when an error occurs, take two props: `error` and `ownProps`.
368
-
2.`LoadingComponent`_(ReactComponent)_: Component rendered during loading, take the same props from loadable component.
369
-
3.`render`_(Function)_: If specified this function is called with in render with an object: `{ loading, error, ownProps, Component }`. It takes precedence over `ErrorComponent` and `LoadingComponent`.
370
-
4.`modules`_(Object)_: This options is only required if you do server-side rendering. It can be automated using babel plugin `loadable-components/babel`.
360
+
1.`ErrorComponent`_(ReactComponent)_: Component rendered when an error occurs, take two props: `error` and `ownProps`.
361
+
2.`LoadingComponent`_(ReactComponent)_: Component rendered during loading, take the same props from loadable component.
362
+
3.`render`_(Function)_: If specified this function is called with in render with an object: `{ loading, error, ownProps, Component }`. It takes precedence over `ErrorComponent` and `LoadingComponent`.
363
+
4.`modules`_(Object)_: This options is only required if you do server-side rendering. It can be automated using babel plugin `loadable-components/babel`.
0 commit comments