chore(deps): upgrade react to 19.2.7 and react types to 19.x (#1154)

Bump react and react-dom 19.1.2 -> 19.2.7 and @types/react and
@types/react-dom from v18 to v19. Keeps babel-plugin-react-compiler,
which is a separate build-time tool, not part of the React 19 runtime.

The @types v19 upgrade surfaced 21 type-only errors, all fixed without
runtime behavior changes:

- useRef<T>() now requires an explicit argument: pass undefined
- DOM element refs are RefObject<T | null>: widen PostFormFields and
  AdvancedSettings ref prop types accordingly
- retype reply-modal onInput handler to FormEvent + currentTarget
- add a null guard for the boards-bar search input
- update test mocks for stricter cloneElement/forwardRef typings

Verified: type-check, lint, 1051 tests, and build pass; react-doctor
score unchanged at 54; browser smoke across Chromium/Firefox/WebKit
plus mobile viewport clean.
This commit is contained in:
Tommaso Casaburi
2026-06-05 18:43:28 +07:00
committed by GitHub
parent 70ffeb816e
commit 9f58bf7e22
13 changed files with 69 additions and 97 deletions
+4 -4
View File
@@ -20,8 +20,8 @@
"@react-spring/web": "10.0.3",
"@ruffle-rs/ruffle": "0.2.0",
"@types/node": "20.19.37",
"@types/react": "18.2.25",
"@types/react-dom": "18.2.10",
"@types/react": "19.2.16",
"@types/react-dom": "19.2.3",
"@use-gesture/react": "10.3.1",
"@vercel/analytics": "^1.6.1",
"ace-builds": "1.41.0",
@@ -37,9 +37,9 @@
"json-stringify-pretty-compact": "4.0.0",
"lodash": "4.18.0",
"memoizee": "0.4.15",
"react": "19.1.2",
"react": "19.2.7",
"react-ace": "14.0.1",
"react-dom": "19.1.2",
"react-dom": "19.2.7",
"react-i18next": "16.6.6",
"react-router-dom": "6.30.2",
"react-router-hash-link": "2.4.3",