Skip to content

Commit

Permalink
fix: remove warning about useLayoutEffect during SSR (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jun 30, 2024
1 parent 84d8b30 commit 23f474e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-boxes-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@assistant-ui/react": patch
---

fix: remove warning about useLayoutEffect in SSR
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-use-callback-ref": "^1.1.0",
"@radix-ui/react-use-escape-keydown": "^1.1.0",
"@radix-ui/react-use-layout-effect": "^1.1.0",
"nanoid": "^5.0.7",
"react-textarea-autosize": "^8.5.3",
"zod": "^3.23.8",
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/utils/OutPortal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useLayoutEffect, useRef, type FC } from "react";
import { useRef, type FC } from "react";
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";

type OutPortalProps = {
node: HTMLElement | null;
Expand Down
21 changes: 12 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 23f474e

Please sign in to comment.