Problem with Next 13 and initialization #1600
-
Hello, In my project I am using Next.js 13 and tailwind. I wanted to use just a carousel, I've copypasted code from the basic example and used useEffect likes this
and in my main page index.js it looks like this
When I load page it shows for a second, and it looks like when it loads that carousel component I got blank page and also in console.log there is an error that says nothing
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I will be grateful for some help or at least some hints how to fix this problem. Does anyone was able to use Carousel in next.js project? |
Beta Was this translation helpful? Give feedback.
-
Hi, we encounter enormous more errors with SSR frameworks and in fact couple other components (like Carousel) are not displaying properly in comparison to CSR frameworks. All you got to do is import Tailwind Elements CSS file in global Next file (like
Error occurs because of inline style of Carousel elements. For now just delete |
Beta Was this translation helpful? Give feedback.
Hi, we encounter enormous more errors with SSR frameworks and in fact couple other components (like Carousel) are not displaying properly in comparison to CSR frameworks.
All you got to do is import Tailwind Elements CSS file in global Next file (like
_app.js/tsx
) or in specific file, where you got the problematic components.import "tw-elements/dist/css/tw-elements.min.css";
Error occurs because of inline style of Carousel elements. For now just delete
style="backface-visibility: hidden"
from components.