Skip to content

Commit

Permalink
fix: rollback to componentWillReceiveProps, fix cash in react@15
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Oct 17, 2019
1 parent c252d78 commit 8ae2390
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/cartesian/Area.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class Area extends PureComponent {
state = { isAnimationFinished: true };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, points, baseLine } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Bar extends PureComponent {
state = { isAnimationFinished: false };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, data } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Brush.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Brush extends PureComponent {
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { data, width, x, travellerWidth, updateId } = this.props;

if (
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Line extends PureComponent {
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, points } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Scatter extends PureComponent {
state = { isAnimationFinished: false };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, points } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/chart/Sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class Sankey extends PureComponent {
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { data, width, height, margin, iterations, nodeWidth, nodePadding, nameKey } = this.props;
if (nextProps.data !== data || nextProps.width !== width ||
nextProps.height !== height || !shallowEqual(nextProps.margin, margin) ||
Expand Down
2 changes: 1 addition & 1 deletion src/chart/Treemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class Treemap extends PureComponent {
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { type, width, height, data, dataKey, aspectRatio } = nextProps;

if (data !== this.props.data ||
Expand Down
2 changes: 1 addition & 1 deletion src/chart/generateCategoricalChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const generateCategoricalChart = ({
}

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { data, children, width, height, layout, stackOffset, margin } = this.props;
const { updateId } = this.state;

Expand Down
2 changes: 1 addition & 1 deletion src/numberAxis/Funnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Funnel extends PureComponent {
state = { isAnimationFinished: false };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, trapezoids } = this.props;

if (nextProps.isAnimationActive !== this.props.isAnimationActive) {
Expand Down
2 changes: 1 addition & 1 deletion src/polar/Pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Pie extends PureComponent {
state = { isAnimationFinished: false };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, sectors } = this.props;

if (nextProps.isAnimationActive !== this.props.isAnimationActive) {
Expand Down
2 changes: 1 addition & 1 deletion src/polar/Radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Radar extends PureComponent {
state = { isAnimationFinished: false };

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, points } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/polar/RadialBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class RadialBar extends PureComponent {
};

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId, data } = this.props;

if (nextProps.animationId !== animationId) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/AnimationDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function (WrappedComponent) {
};

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps) {
const { animationId } = this.state;

if (this.props.data !== nextProps.data) {
Expand Down

0 comments on commit 8ae2390

Please sign in to comment.