Skip to content

Commit 4c694a0

Browse files
feat(react): upgrade to React 19 and replace reactstrap with react-bootstrap
Fix #28130
1 parent 72fda0c commit 4c694a0

44 files changed

Lines changed: 144 additions & 6085 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

generators/react/__snapshots__/generator.spec.ts.snap

Lines changed: 0 additions & 5676 deletions
Large diffs are not rendered by default.

generators/react/generator.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ ${comment}
279279
source.mergeClientPackageJson!({
280280
overrides: {
281281
'browser-sync': nodeDependencies['browser-sync'],
282+
'react-jhipster': {
283+
react: nodeDependencies.react,
284+
'react-dom': nodeDependencies['react-dom'],
285+
},
286+
'react-redux-loading-bar': {
287+
react: nodeDependencies.react,
288+
'react-dom': nodeDependencies['react-dom'],
289+
},
282290
},
283291
});
284292
if (application.clientRootDir) {

generators/react/generators/bootstrap/__snapshots__/generator.spec.ts.snap

Lines changed: 0 additions & 277 deletions
This file was deleted.

generators/react/resources/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"bootstrap": "5.3.8",
99
"bootswatch": "5.3.8",
1010
"path-browserify": "1.0.1",
11-
"react": "18.3.1",
12-
"react-dom": "18.3.1",
11+
"react": "19.1.0",
12+
"react-dom": "19.1.0",
1313
"react-hook-form": "7.71.2",
1414
"react-jhipster": "0.25.3",
1515
"react-redux": "9.2.0",
1616
"react-redux-loading-bar": "5.0.8",
1717
"react-router": "7.13.1",
1818
"react-toastify": "11.0.5",
19-
"reactstrap": "9.2.3",
19+
"react-bootstrap": "2.10.9",
2020
"redux": "5.0.1",
2121
"rxjs": "7.8.2",
2222
"sockjs-client": "1.6.1",
@@ -31,8 +31,8 @@
3131
"@testing-library/react": "16.3.2",
3232
"@types/jest": "30.0.0",
3333
"@types/node": "22.19.13",
34-
"@types/react": "18.3.12",
35-
"@types/react-dom": "18.3.1",
34+
"@types/react": "19.1.6",
35+
"@types/react-dom": "19.1.6",
3636
"@types/webpack-env": "1.18.8",
3737
"autoprefixer": "10.4.27",
3838
"browser-sync": "3.0.4",

generators/react/support/translate-react.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ translate('global', { min:20, max: 50, pattern: '^[a-zA-Z0-9]*$',
120120
import React from 'react';
121121
import { Link } from 'react-router';
122122
import { Translate } from 'react-jhipster';
123-
import { Row, Col, Alert } from 'reactstrap';
123+
import { Row, Col, Alert } from 'react-bootstrap';
124124
125125
import { useAppSelector } from 'app/config/store';
126126
@@ -212,7 +212,7 @@ export default Home;
212212
import React from 'react';
213213
import { Link } from 'react-router';
214214
215-
import { Row, Col, Alert } from 'reactstrap';
215+
import { Row, Col, Alert } from 'react-bootstrap';
216216
217217
import { useAppSelector } from 'app/config/store';
218218

generators/react/templates/package.json.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"react-redux-loading-bar": "<%= nodeDependencies['react-redux-loading-bar'] %>",
4444
"react-router": "<%= nodeDependencies['react-router'] %>",
4545
"react-toastify": "<%= nodeDependencies['react-toastify'] %>",
46-
"reactstrap": "<%= nodeDependencies['reactstrap'] %>",
46+
"react-bootstrap": "<%= nodeDependencies['react-bootstrap'] %>",
4747
"redux": "<%= nodeDependencies['redux'] %>",
4848
<%_ if (skipServer) { _%>
4949
"sonar-scanner": "<%= nodeDependencies['sonar-scanner'] %>",

generators/react/templates/src/main/webapp/app/app.scss.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Custom button styles
113113
Generic styles
114114
========================================================================== */
115115

116-
/* Temporary workaround for availity-reactstrap-validation */
116+
/* Temporary workaround for react-bootstrap validation */
117117
.invalid-feedback {
118118
display: inline;
119119
}

generators/react/templates/src/main/webapp/app/app.tsx.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import './app.scss';
2121
import 'app/config/dayjs';
2222

2323
import React, { useEffect } from 'react';
24-
import { Card } from 'reactstrap';
24+
import { Card } from 'react-bootstrap';
2525
import { BrowserRouter } from 'react-router';
2626
import { ToastContainer, toast } from 'react-toastify';
2727

0 commit comments

Comments
 (0)