You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a fresh installation following the Astro installation instructions, using the Carousel component gives the useCarousel must be used within a <Carousel /> error.
Other components such as Button and Card are working.
Error: useCarousel must be used within a <Carousel />
at useCarousel (/home/paul/tmp/test/src/components/ui/carousel.tsx:37:11)
at /home/paul/tmp/test/src/components/ui/carousel.tsx:199:54
at renderWithHooks (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5662:16)
at renderForwardRef (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:5846:18)
at renderElement (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6009:11)
at renderNodeDestructiveImpl (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6108:11)
at renderNodeDestructive (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
at retryTask (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6532:5)
at performWork (/home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6580:7)
at /home/paul/tmp/test/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6904:12
I have tried using the <Carousel>...</Carousel> element in a React wrapper component; I have tried adding client:load to each child component; using client:only gives the exact same error but in the browser console instead.
Possibly a bug?
This is the only reference I could find to this error anywhere, and the proposed solution did not work for me, and I also don't see why the above shouldn't work.
The text was updated successfully, but these errors were encountered:
Oh. I was under the impression that it would be fine since it's in one island. And I probably also didn't want to accept that it would be necessary to create a wrapper component for any shadcn components that have subcomponents. 🤦
Thanks for the help and the link to the doc, I missed that section.
On a fresh installation following the Astro installation instructions, using the Carousel component gives the
useCarousel must be used within a <Carousel />
error.Other components such as Button and Card are working.
index.astro
:Stack trace:
I have tried using the
<Carousel>...</Carousel>
element in a React wrapper component; I have tried addingclient:load
to each child component; usingclient:only
gives the exact same error but in the browser console instead.Possibly a bug?
This is the only reference I could find to this error anywhere, and the proposed solution did not work for me, and I also don't see why the above shouldn't work.
The text was updated successfully, but these errors were encountered: