Skip to content

Commit defa252

Browse files
committed
Rename deprecated React APIs
1 parent 789e549 commit defa252

37 files changed

+38
-38
lines changed

dev/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class App extends Component {
118118
this.updateState = this.updateState.bind(this);
119119
}
120120

121-
componentWillMount() {
121+
UNSAFE_componentWillMount() {
122122
// curl https://api.github.com/repos/plotly/plotly.js/contents/test/image/mocks \
123123
// | jq '[.[] | .name ]' > mocks.json
124124
fetch('/mocks.json')

examples/demo/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class App extends Component {
2727
this.loadMock = this.loadMock.bind(this);
2828
}
2929

30-
componentWillMount() {
30+
UNSAFE_componentWillMount() {
3131
fetch('https://api.github.com/repos/plotly/plotly.js/contents/test/image/mocks')
3232
.then(response => response.json())
3333
.then(mocks => this.setState({mocks}));

src/components/containers/PlotlyFold.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class PlotlyFold extends Fold {
177177
this.determineVisibility(props, context);
178178
}
179179

180-
componentWillReceiveProps(nextProps, nextContext) {
180+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
181181
this.determineVisibility(nextProps, nextContext);
182182
}
183183

src/components/containers/PlotlySection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class PlotlySection extends Section {
4343
this.determineVisibility(props, context);
4444
}
4545

46-
componentWillReceiveProps(nextProps, nextContext) {
46+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
4747
this.determineVisibility(nextProps, nextContext);
4848
}
4949

src/components/containers/TraceAccordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TraceAccordion extends Component {
1717
this.setLocals(props, context);
1818
}
1919

20-
componentWillReceiveProps(nextProps, nextContext) {
20+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
2121
this.setLocals(nextProps, nextContext);
2222
}
2323

src/components/containers/TraceMarkerSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class TraceMarkerSection extends Component {
88
this.setLocals(context);
99
}
1010

11-
componentWillReceiveProps(nextProps, nextContext) {
11+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
1212
this.setLocals(nextContext);
1313
}
1414

src/components/fields/DataSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class UnconnectedDataSelector extends Component {
1919
this.setLocals(props, context);
2020
}
2121

22-
componentWillReceiveProps(nextProps, nextContext) {
22+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
2323
this.setLocals(nextProps, nextContext);
2424
}
2525

src/components/fields/DropdownCustom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class UnconnectedDropdownCustom extends Component {
2222
};
2323
}
2424

25-
componentWillReceiveProps(props) {
25+
UNSAFE_componentWillReceiveProps(props) {
2626
this.setLocals(props);
2727
}
2828

src/components/fields/HoverLabelNameLength.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class UnconnectedHoverLabelNameLength extends Component {
1818
return props.fullValue > 0 ? 'clip' : props.fullValue === 0 ? 'hide' : 'no-clip';
1919
}
2020

21-
componentWillReceiveProps(nextProps) {
21+
UNSAFE_componentWillReceiveProps(nextProps) {
2222
if (nextProps.fullValue !== this.props.fullValue) {
2323
this.setState({
2424
currentOption: this.getCurrentOption(nextProps),

src/components/fields/LineSelectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class LineSelector extends Component {
6767
this.setLocals(props, context);
6868
}
6969

70-
componentWillReceiveProps(nextProps, nextContext) {
70+
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
7171
this.setLocals(nextProps, nextContext);
7272
}
7373

0 commit comments

Comments
 (0)