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

Refactor componentWillReceiveProps #1253

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

Conversation

DiegoGorgazzi
Copy link

@DiegoGorgazzi DiegoGorgazzi commented Oct 18, 2019

Refactored componentWillReceiveProps to work with componentDidUpdate

Fixes #1084 and #1245

@CLAassistant
Copy link

CLAassistant commented Oct 18, 2019

CLA assistant check
All committers have signed the CLA.

@cesrjimenez
Copy link

Hey y'all when will this be merged?

@jota12x
Copy link

jota12x commented Dec 11, 2019

Hello, any update on this issue? Thanks in advance

@kanzelm3
Copy link
Contributor

I also would like this to be merged. Can we get an update? Seeing an issue where the FlexibleXYPlot is not resizing properly when paired with Suspense because componentWillReceiveProps fires before the display: none !important; is removed from the suspended component, which means it sets the width and height to 0.

@gartenfeld
Copy link

👍

harunurhan added a commit to harunurhan/inspirehep that referenced this pull request Mar 3, 2020
* upgrades to antd to v4
* upgrades to [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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 [email protected]
* 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
@Xiot
Copy link
Contributor

Xiot commented May 31, 2020

Sorry all for the terrible response time.
As you may have been aware, development on react-vis was stalled for some time.
We are getting back into it however, as we are focusing on modernizing it a bit and putting a focus on performance.

I've rebased and fixed some tests over this this PR (that is based on this one) #1343

@jrdzha
Copy link

jrdzha commented Nov 30, 2020

@Xiot Is there any update on when this can be merged? This issue is becoming more and more pressing for us! Thanks!

this.setState({
data: generateSimulation(nextProps)
});
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

why snapshot parameter is declared if it's not used inside componentDidUpdate. Remove unused parameters.

nextProps.height
)
});
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

Remove unused parameters.

@@ -140,8 +140,13 @@ function makeFlexible(Component, isWidthFlexible, isHeightFlexible) {
this.cancelSubscription = subscribeToDebouncedResize(this._onResize);
}

componentWillReceiveProps() {
this._onResize();
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

Remove unused parameters.

@@ -74,8 +74,10 @@ class ArcSeries extends AbstractSeries {
this.state = {scaleProps};
}

componentWillReceiveProps(nextProps) {
this.setState({scaleProps: this._getAllScaleProps(nextProps)});
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

Remove unused parameters.

scaleMixins: nextScaleMixins,
data: nextData
});
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

Remove unused parameters.

scales: _getScaleFns(props),
...getInnerDimensions(props, props.margin)
});
componentDidUpdate(prevProps, prevState, snapshot) {

Choose a reason for hiding this comment

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

Remove unused parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate away from componentWillReceiveProps
9 participants