Skip to content
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

DotLottieWorkerReact gets double rendered in React StrictMode, causing Cannot transfer control from a canvas for more than one time. #439

Open
1 task
robert-j-webb opened this issue Dec 30, 2024 · 0 comments
Labels
bug Something isn't working react

Comments

@robert-j-webb
Copy link

robert-j-webb commented Dec 30, 2024

Overview

I think due to Strict Mode, there is a double render in React, which causes the error in the message in DotLottieWorkerReact

Can confirm it works great if I disable strict mode.

Consuming repo

Repro case: https://codesandbox.io/p/sandbox/epic-kepler-5p6dpm?workspaceId=ws_AQxtEhqyiBX2KFmprbZYRk

(Using the NextJS canary, although I suspect it's any usage of react in Strict mode would cause it.)

(note that I couldn't figure out how to disable strict mode in the sandbox. It's on by default. But you may have to make your own next app in order to turn it off.)

Labels

  • Add the Type: Bug label to this issue.
@theashraf theashraf added bug Something isn't working react labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react
Projects
None yet
Development

No branches or pull requests

2 participants