vaul icon indicating copy to clipboard operation
vaul copied to clipboard

Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Open josuasimatupang opened this issue 10 months ago • 4 comments

I keep getting this warning error when I try to open the Drawer? image

This is my code: image

image

josuasimatupang avatar Apr 18 '24 08:04 josuasimatupang

Probably your CarouselItem needs to forward ref because of asChild prop in Drawer.Trigger

joaom00 avatar Apr 21 '24 13:04 joaom00

I think this is not come from vaul its come from your carousel

rahXephonz avatar May 15 '24 05:05 rahXephonz

This happens to me too. It triggers when I try to open the drawer. Here is the code. image

kapitanluffy avatar Aug 07 '24 07:08 kapitanluffy

To fix this, I had to update the component within the <Drawer.Portal> component to receive a ref with React's forwardRef.

noahsettersten avatar Aug 14 '24 19:08 noahsettersten