1+ ## Why did we fork
2+
3+ This project was originally hosted at https://github.com/jamiebuilds/react-loadable
4+
5+ Since PR https://github.com/jamiebuilds/react-loadable/pull/216 , we marked this project being unmaintained.
6+
7+ ## Readme
8+
19![ React Loadable] ( http://thejameskyle.com/img/react-loadable-header.png )
210
311> A higher order component for loading components with dynamic imports.
@@ -11,7 +19,7 @@ yarn add react-loadable
1119## Example
1220
1321``` js
14- import Loadable from ' react-loadable' ;
22+ import Loadable from ' @yeutech-lab/ react-loadable' ;
1523import Loading from ' ./my-loading-component' ;
1624
1725const LoadableComponent = Loadable ({
@@ -174,7 +182,7 @@ class MyComponent extends React.Component {
174182 Bar: null
175183 };
176184
177- componentWillMount () {
185+ UNSAFE_componentWillMount () {
178186 import (' ./components/Bar' ).then (Bar => {
179187 this .setState ({ Bar: Bar .default });
180188 });
@@ -197,7 +205,7 @@ What about when `import()` fails? What about server-side rendering?
197205Instead you can use ` Loadable ` to abstract away the problem.
198206
199207``` js
200- import Loadable from ' react-loadable' ;
208+ import Loadable from ' @yeutech-lab/ react-loadable' ;
201209
202210const LoadableBar = Loadable ({
203211 loader : () => import (' ./components/Bar' ),
@@ -527,7 +535,7 @@ For this, there is [`Loadable.Capture`](#loadablecapture) component which can
527535be used to collect all the modules that were rendered.
528536
529537``` js
530- import Loadable from ' react-loadable' ;
538+ import Loadable from ' @yeutech-lab/ react-loadable' ;
531539
532540app .get (' /' , (req , res ) => {
533541 let modules = [];
@@ -578,7 +586,7 @@ To convert from modules to bundles, import the [`getBundles`](#getbundles)
578586method from ` react-loadable/webpack ` and the data from Webpack.
579587
580588``` js
581- import Loadable from ' react-loadable' ;
589+ import Loadable from ' @yeutech-lab/ react-loadable' ;
582590import { getBundles } from ' react-loadable/webpack'
583591import stats from ' ./dist/react-loadable.json' ;
584592
@@ -655,7 +663,7 @@ which on resolution means that we can hydrate our app.
655663// src/entry.js
656664import React from ' react' ;
657665import ReactDOM from ' react-dom' ;
658- import Loadable from ' react-loadable' ;
666+ import Loadable from ' @yeutech-lab/ react-loadable' ;
659667import App from ' ./components/App' ;
660668
661669Loadable .preloadReady ().then (() => {
@@ -1063,7 +1071,7 @@ you:
10631071** Input**
10641072
10651073``` js
1066- import Loadable from ' react-loadable' ;
1074+ import Loadable from ' @yeutech-lab/ react-loadable' ;
10671075
10681076const LoadableMyComponent = Loadable ({
10691077 loader : () => import (' ./MyComponent' ),
@@ -1080,7 +1088,7 @@ const LoadableComponents = Loadable.Map({
10801088** Output**
10811089
10821090``` js
1083- import Loadable from ' react-loadable' ;
1091+ import Loadable from ' @yeutech-lab/ react-loadable' ;
10841092import path from ' path' ;
10851093
10861094const LoadableMyComponent = Loadable ({
@@ -1154,7 +1162,7 @@ Specifying the same `loading` component or `delay` every time you use
11541162own Higher-Order Component (HOC) to set default options.
11551163
11561164``` js
1157- import Loadable from ' react-loadable' ;
1165+ import Loadable from ' @yeutech-lab/ react-loadable' ;
11581166import Loading from ' ./my-loading-component' ;
11591167
11601168export default function MyLoadable (opts ) {
0 commit comments