-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gatsby Build - SSR failed #732
Comments
I can't use it in nextjs
It would be great to have SSR support. |
Facing the same issue: undefined (window) in SSR |
In these cases I usually wrap it into something like this: `function Page({ render = "effect", children } = {}) { React.useEffect(() => { if (render === "effect" && !hasRenderedOnClient) { if (render === "effect-seo" && !hasRenderedOnClient) { return <>{children}</>;` so it renders when useEffect kicks in on the client. |
why do you call this react-carousel? carousel doesn't work with react, gatsby, or next..there are 3 more closed(!) window issues related to this...dynamic import doesn't bring the module and why should we dynamic import anyway... |
Hello,
I've been trying to use react-carousel in my project, while it works in development, it doesn't when I try to build.
I have read all the posts that deal with this problem and I manage to partially solve it EXCEPT when I have to use slidesToShowPlugin and autoplayPlugin.
Here is my import which works locally :
import Carousel, { slidesToShowPlugin, autoplayPlugin } from '@brainhubeu/react-carousel';
I changed it to this one:
const Carousel = loadable(() => import('@brainhubeu/react-carousel'))
show me errors :
My Carousel component refers to several plugins:
I specify that I use Gatsby and not Next.js. So I used the "loadable" library which is mentioned by another user (last message here : #287) and which works well, except when it is also necessary to import plugins from Carousel.
Thanks
The text was updated successfully, but these errors were encountered: