From 29abc46424db8ba67dec0e2fde1a5a35ffd56f84 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Sun, 18 Nov 2018 16:10:30 -0800 Subject: [PATCH 1/2] Replace react-loadable with two active alternatives. `react-loadable` no longer has an active maintainer. Only personal forks are available for Webpack 4 + Babel 7 support. --- content/docs/code-splitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md index 887b8f336a7..513df49f5e4 100644 --- a/content/docs/code-splitting.md +++ b/content/docs/code-splitting.md @@ -115,7 +115,7 @@ parse the dynamic import syntax but is not transforming it. For that you will ne > Note: > -> `React.lazy` and Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we still recommend [React Loadable](https://github.com/thejameskyle/react-loadable). It has a nice [guide for bundle splitting with server-side rendering](https://github.com/thejameskyle/react-loadable#------------server-side-rendering). +> `React.lazy` and Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we recommend [Loadable Components](https://github.com/smooth-code/loadable-components) or [React Universal Component](https://github.com/faceyspacey/react-universal-component). The `React.lazy` function lets you render a dynamic import as a regular component. From 94c5182f1bd291afc44c7b654729222ebf290dcf Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Mon, 19 Nov 2018 09:21:07 -0800 Subject: [PATCH 2/2] Remove react-universal-component. Change recommendation to only `loadable-components` and link directly to the SSR documentation. --- content/docs/code-splitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md index 513df49f5e4..d779273f537 100644 --- a/content/docs/code-splitting.md +++ b/content/docs/code-splitting.md @@ -115,7 +115,7 @@ parse the dynamic import syntax but is not transforming it. For that you will ne > Note: > -> `React.lazy` and Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we recommend [Loadable Components](https://github.com/smooth-code/loadable-components) or [React Universal Component](https://github.com/faceyspacey/react-universal-component). +> `React.lazy` and Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we recommend [Loadable Components](https://github.com/smooth-code/loadable-components). It has a nice [guide for bundle splitting with server-side rendering](https://github.com/smooth-code/loadable-components/blob/master/packages/server/README.md). The `React.lazy` function lets you render a dynamic import as a regular component.