Skip to content

build(deps): upgrade to React 19 (coordinated with react-leaflet 5)#114

Merged
atomantic merged 1 commit into
mainfrom
chore/react19
Jun 12, 2026
Merged

build(deps): upgrade to React 19 (coordinated with react-leaflet 5)#114
atomantic merged 1 commit into
mainfrom
chore/react19

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Upgrades the client to React 19. The standalone Dependabot PRs couldn't land it: #88 bumped react without react-dom, and react-leaflet@4 pins react to ^18. This bumps all of them together — react, react-dom, @types/react, @types/react-dom to 19, and react-leaflet 4→5 (which adds React 19 support). The react-leaflet components used here (MapContainer, TileLayer, Marker, Polyline, Popup, useMap) are unchanged in v5.

React 19 type migration fixes

  • useRef<T>()useRef<T>(undefined) — React 19 made the initial arg required (3 sites: CopyButton, LinkRelationshipDialog, RelationshipModal).
  • FamilyUnitCard: added import type { JSX } from 'react' for the JSX.Element return type.
  • AiDiscoveryModal: explicit React.MouseEvent annotation on a Link onClick.

Supersedes Dependabot #88 and #104.

Test plan

  • npm run build (shared + server + client) — passes, 0 TS errors.
  • npm test — the 18 failing suites are pre-existing better-sqlite3 native-binding failures (identical on main in this environment), unrelated to this change. React/client code compiles clean.

Bumps react, react-dom, and @types/react(-dom) to 19 in the client. React 19
couldn't land via the standalone Dependabot PRs (#88 bumped react without
react-dom, and react-leaflet@4 pins react to ^18) — react-leaflet must move to
v5 for React 19 support, so all four are upgraded together. The only
react-leaflet API used (MapContainer/TileLayer/Marker/Polyline/Popup/useMap) is
unchanged in v5.

React 19 type fixes: useRef<T>() now requires an initial arg (-> useRef<T>(undefined),
3 sites), JSX.Element namespace import in FamilyUnitCard, and an explicit
React.MouseEvent annotation on a Link onClick.

Supersedes Dependabot #88 (react 19) and #104 (react-dom 19). Verified: full
build passes; the 18 failing tests are pre-existing better-sqlite3 native-binding
failures on main, unrelated to this change.
@atomantic atomantic merged commit f60ab98 into main Jun 12, 2026
4 checks passed
@atomantic atomantic deleted the chore/react19 branch June 12, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant