From a1cd4b014c440d137278784a492e50fbf9239a03 Mon Sep 17 00:00:00 2001 From: 0xPratik Date: Mon, 2 Nov 2026 22:55:03 +0545 Subject: [PATCH] build(deps): require React 19 Narrow the react and react-dom peer range to ^19.0.0 and drop the React 18 claims from the README and the Panel docs. Many components take `ref` as a plain prop, which only reaches them on React 19, so React 18 consumers were never fully supported. --- README.md | 4 ++-- bun.lock | 4 ++-- package.json | 4 ++-- src/ui/panel.tsx | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 07529823..3daf6f00 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @corbits/react-ui -React components for agent products: conversations with reasoning, tool calls and approvals, run status, artifacts and charts, styled by one Tailwind v4 token theme. The UI package of Corbits: it renders data a host web app loads from Interchange, and works in any React 18 or 19 app without Interchange. +React components for agent products: conversations with reasoning, tool calls and approvals, run status, artifacts and charts, styled by one Tailwind v4 token theme. The UI package of Corbits: it renders data a host web app loads from Interchange, and works in any React 19 app without Interchange. ## Why @corbits/react-ui? @@ -15,7 +15,7 @@ React components for agent products: conversations with reasoning, tool calls an bun add @corbits/react-ui react react-dom lucide-react @radix-ui/react-slot ``` -Requires Node 24 or later. Tested on React 19; the peer range also accepts React 18.2+. +Requires Node 24 or later and React 19. Optional peers are needed only by the modules that import them. Those modules are not in the root entry, so import them by subpath: diff --git a/bun.lock b/bun.lock index ebc851ad..bf174f20 100644 --- a/bun.lock +++ b/bun.lock @@ -41,8 +41,8 @@ "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tooltip": "^1.2.8", "lucide-react": "^0.545.0 || ^1.0.0", - "react": "^18.2.0 || ^19.0.0", - "react-dom": "^18.2.0 || ^19.0.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", "sonner": "^2.0.7", }, "optionalPeers": [ diff --git a/package.json b/package.json index 1a9d8cf5..17e4fbf9 100644 --- a/package.json +++ b/package.json @@ -124,8 +124,8 @@ "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tooltip": "^1.2.8", "lucide-react": "^0.545.0 || ^1.0.0", - "react": "^18.2.0 || ^19.0.0", - "react-dom": "^18.2.0 || ^19.0.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", "sonner": "^2.0.7" }, "peerDependenciesMeta": { diff --git a/src/ui/panel.tsx b/src/ui/panel.tsx index fe6c460f..b5834b11 100644 --- a/src/ui/panel.tsx +++ b/src/ui/panel.tsx @@ -87,8 +87,7 @@ export type PanelProps = React.ComponentProps<"aside"> & { * itself goes back to what the overlay took it from. * * However it closes, focus that was inside the panel goes back to whatever - * had it before the panel opened. `ref` reaches the `aside` on React 18 and - * 19. + * had it before the panel opened. `ref` reaches the `aside`. */ export const Panel = forwardRef(function Panel( {