-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace unmaintained react-loadable package with loadable-components. #1407
Conversation
`react-loadable` no longer has an active maintainer. Only personal forks are available for Webpack 4 + Babel 7 support.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Deploy preview for reactjs ready! Built with commit 94c5182 |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
content/docs/code-splitting.md
Outdated
@@ -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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between them?
It looks like react-universal-component
depends on legacy context. While this is true, I'd prefer that we don't recommend it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handling of CSS imports (including HMR) is much nicer in react-universal-component
. They're otherwise pretty similar. Since that's a minor difference, I'll drop it in favor of just loadable-components
and add a link to their SSR section.
Change recommendation to only `loadable-components` and link directly to the SSR documentation.
The React Suspense docs will point to `loadable-components` once reactjs/react.dev#1407 is merged, so there will no need to have this line.
The React Suspense docs will point to `loadable-components` once reactjs/react.dev#1407 is merged, so there will no need to have this line.
The React Suspense docs will point to `loadable-components` once reactjs/react.dev#1407 is merged, so there will no need to have this line.
react-loadable
no longer has an active maintainer and has no support for Webpack 4 or Babel 7. Only personal forks are available. This isn't clear at all from the github page, and can only be discovered by digging into issues such as jamiebuilds/react-loadable#151.This PR links to two actively-developed projects which accomplish the same thing - split on the server and load all bundles in parallel.
Closes #1146, which was about the react-loadable license (which has since been reverted).