Skip to content

Commit c74bcc4

Browse files
authored
migrate frontend to React 19 (#487)
Migrate frontend to React 19.2, TypeScript 5.9, and Vite 8 Bump React to 19.2.4, react-dom to 19.2.4 Bump TypeScript to 5.9.3 (@types/react 19, @types/react-dom 19) Bump Vite to 8.0, @vitejs/plugin-react to 5.2, vitest to 4.1 Bump @testing-library/react to 16.3 (required for React 19) Bump @mantine/core + @mantine/hooks to 7.17 (React 19 peer dep) Bump react-redux to 9.2, add explicit redux 5.0 dependency Bump react-router-dom to 6.30.3, @tabler/icons-react to 3.40 Bump jsdom to 28, @types/node to 24 Fix Redux 5 type-stricter breaking changes: Add [key: string]: unknown index signature to LoginAction/LogoutAction so they satisfy Redux 5's UnknownAction requirement Cast reducers via as unknown as Reducer<RootState, AuthenticationActionTypes> to reconcile combineReducers' 3-param Reducer type with createStore's 2-param overload Switch DevTools enhancer from && idiom to optional chaining (?.) so the type is StoreEnhancer | undefined instead of false | StoreEnhancer Fix test/config changes for vitest 4 and React Router v6 future flags: Replace vi.fn().mockImplementation(() => ...) with class for ResizeObserver mock (vitest 4 requires function/class, not arrow, for constructors called with new) Use regular function for matchMedia mock to silence vitest 4 warning Switch vite.config.mts to import defineConfig from vitest/config (v4 style) Add v7_startTransition + v7_relativeSplatPath future flags to HashRouter and MemoryRouter to silence React Router v6 deprecation warnings
1 parent d167327 commit c74bcc4

23 files changed

Lines changed: 4591 additions & 27800 deletions

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
<properties>
2020
<java.version>21</java.version>
21-
<node.version>v18.16.0</node.version>
21+
<node.version>v24.12.0</node.version>
22+
<npm.version>10.9.2</npm.version>
2223
<spring-cloud-aws.version>4.0.0</spring-cloud-aws.version>
2324
<testcontainers.version>2.0.3</testcontainers.version>
2425
<wiremock.version>3.13.0</wiremock.version>
@@ -314,6 +315,7 @@
314315
<configuration>
315316
<workingDirectory>src/frontend</workingDirectory>
316317
<nodeVersion>${node.version}</nodeVersion>
318+
<npmVersion>${npm.version}</npmVersion>
317319
</configuration>
318320
<executions>
319321
<execution>

src/frontend/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<link href="/favicon.ico" rel="icon"/>
6+
<meta content="width=device-width, initial-scale=1" name="viewport"/>
7+
<meta content="#000000" name="theme-color"/>
8+
<meta content="Web site created using Vite" name="description"/>
9+
<link href="/logo192.png" rel="apple-touch-icon"/>
10+
<link href="/manifest.json" rel="manifest"/>
11+
<title>Book Reviewr</title>
12+
</head>
13+
<body>
14+
<noscript>You need to enable JavaScript to run this app.</noscript>
15+
<div id="root"></div>
16+
<script type="module" src="/src/index.tsx"></script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)