Skip to content

Commit d0d9540

Browse files
authored
Merge pull request #3093 from plotly/default-react-18
Default to react 18
2 parents 4a84603 + 0f07e88 commit d0d9540

File tree

33 files changed

+312
-413
lines changed

33 files changed

+312
-413
lines changed

.circleci/config.yml

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -219,24 +219,6 @@ jobs:
219219
- store_artifacts:
220220
path: /tmp/dash_artifacts
221221

222-
test-312-react-18:
223-
<<: *test
224-
docker:
225-
- image: cimg/python:3.12.1-browsers
226-
auth:
227-
username: dashautomation
228-
password: $DASH_PAT_DOCKERHUB
229-
environment:
230-
PERCY_ENABLE: 0
231-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: True
232-
PYVERSION: python312
233-
REDIS_URL: redis://localhost:6379
234-
REACT_VERSION: "18.2.0"
235-
- image: cimg/redis:6.2.6
236-
auth:
237-
username: dashautomation
238-
password: $DASH_PAT_DOCKERHUB
239-
240222
test-38:
241223
<<: *test
242224
docker:
@@ -337,18 +319,6 @@ jobs:
337319
- store_artifacts:
338320
path: /tmp/dash_artifacts
339321

340-
dcc-312-react-18:
341-
<<: *dcc-test
342-
docker:
343-
- image: cimg/python:3.12.1-browsers
344-
auth:
345-
username: dashautomation
346-
password: $DASH_PAT_DOCKERHUB
347-
environment:
348-
PYVERSION: python312
349-
PERCY_ENABLE: 0
350-
REACT_VERSION: "18.2.0"
351-
352322
dcc-38:
353323
<<: *dcc-test
354324
docker:
@@ -414,18 +384,6 @@ jobs:
414384
- store_artifacts:
415385
path: /tmp/dash_artifacts
416386

417-
html-312-react-18:
418-
<<: *html-test
419-
docker:
420-
- image: cimg/python:3.12.1-browsers
421-
auth:
422-
username: dashautomation
423-
password: $DASH_PAT_DOCKERHUB
424-
environment:
425-
PYVERSION: python312
426-
PERCY_ENABLE: 0
427-
REACT_VERSION: "18.2.0"
428-
429387
html-38:
430388
<<: *html-test
431389
docker:
@@ -486,15 +444,6 @@ jobs:
486444
- store_artifacts:
487445
path: /tmp/dash_artifacts
488446

489-
table-server-react-18:
490-
<<: *table-server
491-
docker:
492-
- image: cimg/python:3.12.1-browsers
493-
environment:
494-
PYVERSION: python312
495-
PERCY_ENABLE: 0
496-
REACT_VERSION: "18.2.0"
497-
498447
table-unit-test:
499448
working_directory: ~/dash
500449
docker:
@@ -627,9 +576,6 @@ workflows:
627576
- test-312:
628577
requires:
629578
- install-dependencies-312
630-
- test-312-react-18:
631-
requires:
632-
- install-dependencies-312
633579
- test-38:
634580
requires:
635581
- install-dependencies-38
@@ -644,19 +590,13 @@ workflows:
644590
- dcc-312:
645591
requires:
646592
- install-dependencies-312
647-
- dcc-312-react-18:
648-
requires:
649-
- install-dependencies-312
650593
- dcc-38:
651594
requires:
652595
- install-dependencies-38
653596

654597
- html-312:
655598
requires:
656599
- install-dependencies-312
657-
- html-312-react-18:
658-
requires:
659-
- install-dependencies-312
660600
- html-38:
661601
requires:
662602
- install-dependencies-38
@@ -671,9 +611,6 @@ workflows:
671611
- table-server:
672612
requires:
673613
- install-dependencies-312
674-
- table-server-react-18:
675-
requires:
676-
- install-dependencies-312
677614

678615
- percy/finalize_all:
679616
requires:

@plotly/dash-generator-test-component-nested/src/components/MyNestedComponent.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyNestedComponent description
66
*/
7-
const MyNestedComponent = ({ id, value }) => (<div id={id}>{value}</div>);
7+
const MyNestedComponent = ({ id, value = '' }) => (<div id={id}>{value}</div>);
88

99
MyNestedComponent.propTypes = {
1010
/**
@@ -18,8 +18,4 @@ MyNestedComponent.propTypes = {
1818
value: PropTypes.string
1919
};
2020

21-
MyNestedComponent.defaultProps = {
22-
value: ''
23-
};
24-
2521
export default MyNestedComponent;

@plotly/dash-generator-test-component-standard/src/components/MyStandardComponent.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyComponent description
66
*/
7-
const MyStandardComponent = ({ id, style, value }) => (<div id={id} style={style}>{value}</div>);
7+
const MyStandardComponent = ({ id, style, value = '' }) => (<div id={id} style={style}>{value}</div>);
88

99
MyStandardComponent.propTypes = {
1010
/**
@@ -23,8 +23,4 @@ MyStandardComponent.propTypes = {
2323
value: PropTypes.string
2424
};
2525

26-
MyStandardComponent.defaultProps = {
27-
value: ''
28-
};
29-
30-
export default MyStandardComponent;
26+
export default MyStandardComponent;

@plotly/dash-test-components/src/components/AsyncComponent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ AsyncComponent.propTypes = {
1414
value: PropTypes.string
1515
};
1616

17-
AsyncComponent.defaultProps = {};
18-
1917
export default AsyncComponent;

@plotly/dash-test-components/src/components/CollapseComponent.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@ CollapseComponent.propTypes = {
1111
id: PropTypes.string
1212
};
1313

14-
CollapseComponent.defaultProps = {
15-
display: false
16-
};
17-
1814
export default CollapseComponent;
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33

4-
const DelayedEventComponent = ({ id, n_clicks, setProps }) => (<button
4+
const DelayedEventComponent = ({ id, n_clicks = 0, setProps }) => (<button
55
id={id}
66
onClick={() => setTimeout(() => setProps({ n_clicks: n_clicks + 1 }), 20)}
77
/>);
@@ -11,8 +11,4 @@ DelayedEventComponent.propTypes = {
1111
n_clicks: PropTypes.number
1212
};
1313

14-
DelayedEventComponent.defaultProps = {
15-
n_clicks: 0
16-
};
17-
1814
export default DelayedEventComponent;

@plotly/dash-test-components/src/components/FragmentComponent.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ FragmentComponent.propTypes = {
1010
id: PropTypes.string
1111
};
1212

13-
FragmentComponent.defaultProps = {};
14-
15-
export default FragmentComponent;
13+
export default FragmentComponent;

@plotly/dash-test-components/src/components/StyledComponent.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
/**
55
* MyComponent description
66
*/
7-
const StyledComponent = ({ id, style, value }) => (<div id={id} style={style}>{value}</div>);
7+
const StyledComponent = ({ id, style, value = '' }) => (<div id={id} style={style}>{value}</div>);
88

99
StyledComponent.propTypes = {
1010
/**
@@ -23,8 +23,4 @@ StyledComponent.propTypes = {
2323
value: PropTypes.string
2424
};
2525

26-
StyledComponent.defaultProps = {
27-
value: ''
28-
};
29-
3026
export default StyledComponent;
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import PropTypes from 'prop-types';
22
import React, { Fragment } from 'react';
33

4-
const WidthComponent = props => (<Fragment>
5-
{props.width}
4+
const WidthComponent = ({width = 0}) => (<Fragment>
5+
{width}
66
</Fragment>);
77

88
WidthComponent.propTypes = {
99
id: PropTypes.string,
1010
width: PropTypes.number
1111
};
1212

13-
WidthComponent.defaultProps = {
14-
width: 0
15-
};
16-
17-
export default WidthComponent;
13+
export default WidthComponent;

@plotly/dash-test-components/src/fragments/AsyncComponent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ AsyncComponent.propTypes = {
1111
value: PropTypes.string
1212
};
1313

14-
AsyncComponent.defaultProps = {};
15-
1614
export default AsyncComponent;

0 commit comments

Comments
 (0)