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

Updated componentWillMount to componentDidMount #220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Daggron
Copy link

@Daggron Daggron commented Dec 17, 2019

I was using this in my project and i saw its using componentWillMount which will be deprected in the new version of react so i updated it with componentDidMount. To avoid deprecation and remove the warning

src/index.js Outdated
@@ -213,7 +213,7 @@ function createLoadableComponent(loadFn, options) {
});
}

componentWillUnmount() {
componentDidUnmount() {
Copy link

@pixmaster pixmaster Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, componentWillUnmount wasn't deprecated, only componentWillMount.

BTW componentDidUnmount non-existent method

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay , Sir I will change it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sir i have changed the method back to componentWillUnmount

@stonecrafter
Copy link

Also interested in this change 🎉

@brendonco
Copy link

Any plan on merging this PR? and release date?

@alirizvi2008
Copy link

Can someone help merge this PR and publish the lib :)

@dabyland
Copy link

dabyland commented Feb 4, 2020

Seems like a very small change for this codebase, would love to see it merged and published soon!

@viiiprock
Copy link

Guys, I considered react-loadable has not been maintaining, please migrate to other package such as react-imported-component, loadable-component...
Good luck.

@goldenshooter
Copy link

Anyone can merge this PR? I got same warning.

@alex-zhang
Copy link

same warning. any update?

@mouhsnimohamed
Copy link

why this PR wont be merged?

@dabyland
Copy link

I don't mean to harp on this pull request but it's a one line change that has been open for 2 months with no update. Can we please have some communication for the cause of the hold up?

Thanks!

harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
* upgrades to antd to v4
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
* upgrades to antd to v4
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
INSPIR-3203

* upgrades to antd to v4
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
INSPIR-3203

* upgrades to antd to v4
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
INSPIR-3203

* upgrades to antd to v4
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 4, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 4, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 4, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 4, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800

* `componentWillReceiveProps` warnings from `react-quill`
zenoamaro/react-quill#549
harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800

* `componentWillReceiveProps` warnings from `react-quill`
zenoamaro/react-quill#549
harunurhan added a commit to inspirehep/inspirehep that referenced this pull request Mar 5, 2020
* upgrades to antd to v4
 * fixes UX problems with date range picker: INSPIR-3203
 * reduces bundle size by removing unnecessary icons: INSPIR-3228
* upgrades to react@16.13.10
* upgrades to react-router to v5

Unresolved:

* `componentWillReceiveProps` warnings from `react-vis`
uber/react-vis#1253

* search name space truncates some options like  `conferen...`
ant-design/ant-design#21754

* `componentWillMount` warnings from `react-helmet`
nfl/react-helmet#413

* `componentWillMount` warnings from `react-loadable`
jamiebuilds/react-loadable#220

* `Cannot update a component from inside the function body of a
different component.` worning from `antd`
ant-design/ant-design#21800

* `componentWillReceiveProps` warnings from `react-quill`
zenoamaro/react-quill#549
@p0o
Copy link

p0o commented Mar 20, 2020

Hi all, I put the fixed version with addition of build files in my github repo so you can change your npm package to this if you need a quick fix.

should look like this in package.json:

"react-loadable": "github:p0o/react-loadable",

@cnscorpions
Copy link

@p0o it works, thanks. I cloned this repo, and found "yarn start" not work at all.

@p0o
Copy link

p0o commented May 27, 2020

@cnscorpions I think I built it with npm.

@darcyadams
Copy link

So it is clear that we will be migrating off react-loadable at some point. I certainly understand the challenges of donating your time to an open source project.
However, those of us in larger projects can't necessarily do that immediately. We also can't cutover to a random github fork, as there is no guarantee that won't change or disappear.
So, in the meantime, we would really appreciate it if the maintainers of this repo could take the few minutes it would take to merge this PR and publish a new patch version to npm. 🙏
Thanks for your time and for building this very useful tool.

@p0o
Copy link

p0o commented Jul 26, 2020

So it is clear that we will be migrating off react-loadable at some point. I certainly understand the challenges of donating your time to an open source project.
However, those of us in larger projects can't necessarily do that immediately. We also can't cutover to a random github fork, as there is no guarantee that won't change or disappear.
So, in the meantime, we would really appreciate it if the maintainers of this repo could take the few minutes it would take to merge this PR and publish a new patch version to npm. 🙏
Thanks for your time and for building this very useful tool.

Suggestion: You can fork my repo up there into your github organization or publish your npm package if you need a more reliable solution.

@slorber
Copy link

slorber commented Feb 12, 2021

For anyone interested, here's my solution to get rid of the warning (React 16 + 17) and still get this working (client+SSR).

#213 (comment)

Repository owner deleted a comment from ygs-code Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet