|
36 | 36 |
|
37 | 37 | 👉 [Usage](#usage) | [API](#api) | [Setup](#setup) | [SSR](#ssr) | [CCS](#css) [Concurrent loading](#concurrent-loading) | [Webpack/Parcel](#bundler-integration) |
38 | 38 |
|
39 | | - |
| 39 | +| Library | Suspense | SSR | Hooks | Library | Non-modules | import(`./${value}`) | |
| 40 | +| ------------- | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | |
| 41 | +| React.lazy|✅|❌|❌|❌|❌| |
| 42 | +| react-loadable | ✅| ✅| ❌| ❌| ✅| ❌ | |
| 43 | +| @loadable/component | ✅| ✅| ❌| ✅| ❌ | ✅ | |
| 44 | +| imported-component |✅| ✅| ✅| ✅| ✅ | ❌ | |
| 45 | + |
| 46 | +> Read more abotu [what this table displays](#comparisonLegend) |
| 47 | +
|
40 | 48 | Key features: |
41 | 49 | - 1️⃣ Single source of truth - your __bundler drives__ everything |
42 | 50 | - 📖 __library__ level code __splitting__ |
@@ -83,15 +91,6 @@ Key features: |
83 | 91 |
|
84 | 92 | <a name="usage"/> |
85 | 93 |
|
86 | | - |
87 | | -| Library | Suspense | SSR | Hooks | Library splitting | Non-modules | import(`./${value}`) | |
88 | | -| ------------- | ----- | ----- | ----- | ----- | ----- | ----- | |
89 | | -| React.lazy|✅|❌|❌|❌|❌| |
90 | | -| react-loadable | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | |
91 | | -| @loadable/component | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | |
92 | | -| imported-component | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | |
93 | | - |
94 | | - |
95 | 94 | # Usage |
96 | 95 |
|
97 | 96 | ## Server side |
@@ -654,6 +653,16 @@ state loss if `lazy` is created not in the user space. At it would be created in |
654 | 653 |
|
655 | 654 | If React-Hot-Loader is detected `lazy` switches to `imported async` mode, this behaves absolutely the same. |
656 | 655 |
|
| 656 | +<a name="comparisonLegend" /> |
| 657 | +### Comparison table legend |
| 658 | +- Library - the library name |
| 659 | +- Suspense - does it support Suspense feature |
| 660 | +- SSR - does it support SSR |
| 661 | +- Hooks - does it have hooks API |
| 662 | +- Library - does it support _library_, not Component level splitting |
| 663 | +- Non-modules - could it "import" generic promise, not a real dynamic module import |
| 664 | +- import(`./${value}`) - does it support a full dynamic import |
| 665 | + |
657 | 666 | ## Other loaders |
658 | 667 | Another loaders exists, and the only difference is in API, and how they manage (or not manage) SSR. |
659 | 668 |
|
|
0 commit comments