Skip to content

feat: support React 19#887

Merged
korvin89 merged 1 commit into
mainfrom
support-react-19
Jun 5, 2026
Merged

feat: support React 19#887
korvin89 merged 1 commit into
mainfrom
support-react-19

Conversation

@korvin89
Copy link
Copy Markdown
Collaborator

@korvin89 korvin89 commented Jun 4, 2026

Summary

  • Extends the react peer dependency range with ^19.0.0 (kept ^16.0.0 || ^17.0.0 || ^18.0.0 for backwards compatibility).
  • Bumps react/react-dom dev deps and @types/react/@types/react-dom to ^19.
  • Adjusts a handful of type-level usages to satisfy stricter typings in @types/react@19:
    • Replaces useRef<T>() with useRef<T | undefined>(undefined) / useRef<T | null>(null) — the zero-argument overload was removed.
    • Tightens HighchartsReactRefObject.container to RefObject<HTMLDivElement | null>.

No runtime behaviour changes; forwardRef, React.FC and other still-supported APIs were intentionally left in place to keep the diff small.

Compatibility

  • @gravity-ui/uikit@^7 already declares react ^16.14 || ^17 || ^18 || ^19 as a peer.
  • @gravity-ui/charts@^1.55 accepts react >=17.0.0.
  • No other workspace peer constraints had to change.

- Extend `react` peer dependency range with `^19.0.0`
- Bump `@types/react`/`@types/react-dom` to `^19` and React dev deps to `^19`
- Replace `useRef<T>()` with `useRef<T | undefined>(undefined)` / `useRef<T | null>(null)` (zero-arg overload removed in @types/react@19)
- Tighten `HighchartsReactRefObject.container` to `RefObject<HTMLDivElement | null>`
@korvin89 korvin89 requested a review from kuzmadom as a code owner June 4, 2026 17:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 18.64% 286 / 1534
🔵 Statements 18.73% 296 / 1580
🔵 Functions 14.5% 48 / 331
🔵 Branches 12.95% 149 / 1150
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/ChartKit.tsx 0% 0% 0% 0% 14-74
src/hooks/misc.ts 0% 100% 0% 0% 4-10
src/plugins/highcharts/renderer/components/HighchartsReact.tsx 0% 0% 0% 0% 29-120
Generated in workflow #188 for commit 9780d41 by the Vitest Coverage Report Action

@gravity-ui-bot
Copy link
Copy Markdown
Contributor

🎭 Tests Report is ready.
🎭 Coverage Report is ready.

@gravity-ui-bot
Copy link
Copy Markdown
Contributor

Preview is ready.

@korvin89 korvin89 merged commit ef037d9 into main Jun 5, 2026
5 checks passed
@korvin89 korvin89 deleted the support-react-19 branch June 5, 2026 07:33
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.

3 participants