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

react-dnd HTML5 backend from react-mosaic can conflict with other non-Mirador components #2629

Closed
broadwell opened this issue May 29, 2019 · 0 comments · Fixed by #3094
Closed
Milestone

Comments

@broadwell
Copy link
Contributor

This is perhaps best addressed via a note in the wiki, unless an in-code fix is much easier than expected. The gist is that if Mirador 3 in Mosaic mode is embedded in another React app that uses react-dnd in a different component, the two can produce the dreaded Cannot have two HTM5 backends at the same time error. This can happen even when toggling from Mirador 3 to the other component, due to the asynchronous tear-down behavior in React 16.

This comment succinctly captures the problem, the challenges react-dnd's architecture poses to an in-code fix, and the easiest workaround:
facebook/react#11106 (comment)
The workaround is to set a state flag in one of the components so that it doesn't render until mounted.

@cbeer cbeer added this to the 3.0.0 milestone Jul 3, 2019
@cbeer cbeer mentioned this issue Jun 17, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants