Skip to content
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

Merged
merged 2 commits into from
Nov 19, 2018

Conversation

threehams
Copy link
Contributor

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).

`react-loadable` no longer has an active maintainer. Only personal forks are available for Webpack 4 + Babel 7 support.
@facebook-github-bot
Copy link
Collaborator

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!

@reactjs-bot
Copy link

reactjs-bot commented Nov 19, 2018

Deploy preview for reactjs ready!

Built with commit 94c5182

https://deploy-preview-1407--reactjs.netlify.com

@facebook-github-bot
Copy link
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@@ -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).
Copy link
Member

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.

Copy link
Contributor Author

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.
threehams added a commit to threehams/loadable-components that referenced this pull request Nov 19, 2018
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.
@threehams threehams changed the title Replace unmaintained react-loadable package with two active alternatives. Replace unmaintained react-loadable package with loadable-components. Nov 19, 2018
@gaearon gaearon merged commit 5284091 into reactjs:master Nov 19, 2018
gregberge pushed a commit to gregberge/loadable-components that referenced this pull request Nov 19, 2018
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.
FE2Topper0127 added a commit to FE2Topper0127/loadable_components that referenced this pull request Apr 27, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants