-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
[Bug]: Init event not fired in SSR (React / NextJS) #689
Comments
@StevenVerbiest I can't access the link you shared. Would you mind double checking it? Best, |
@davidjerleke I can't get the direct link to work for some reason, but do you have access to the source files? |
@StevenVerbiest thanks for pointing me to the source files, that worked. I believe you should read this to better understand why it's happening: Best, |
Thanks for the info. I'm also having some other issues related to SRR regarding to special layouts, but I won't go into detail since it's unrelated to this issue. I like Embla, but not supporting SSR is an issue for me, so I will sadly need to look for an alternative. |
@StevenVerbiest thanks. Although Embla doesn't run its script on the server, it still allows rendering the HTML and CSS on the server side.
|
Bug is related to
Embla Carousel version
Describe the bug
The
.on("init")
event is not invoked when used in a useEffect in a SSR component.CodeSandbox
https://stackblitz.com/edit/stackblitz-starters-syez5k?file=app%2FEmblaComponent.tsx
https://stackblitzstarterssyez5k-c0ir--3000--f7aa08df.local-credentialless.webcontainer.io/
Steps to reproduce
'init'
logThe log is shown after a hot reload. If you see the init log, do a hard refresh.
Expected behavior
The init event should always fire.
The text was updated successfully, but these errors were encountered: