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

Duplicate HTML5 backend error #230

Open
jandrew44 opened this issue Mar 1, 2024 · 3 comments
Open

Duplicate HTML5 backend error #230

jandrew44 opened this issue Mar 1, 2024 · 3 comments

Comments

@jandrew44
Copy link

Sometimes I am getting the following error when using react-arborist 3.4.0: "Cannot have two HTML5 backends at the same time".
My project does not have direct dependencies "react-dnd", "dnd-core" and "react-dnd-html5-backend" and I don't have any other libraries depending on these packages(react-arborist is the only library requesting it).
Also I don't use drag&drop functionality in my project at all, but I am using react-arborist trees inside of several react components.
I tried to set disableDrag and disableDrop flags for all of my trees but it did not help.
Is it possible to configure react-arborist to not initialize HTML5 backend when drag&drop functionality is not needed(or at least do not do it twice)?

@bijinfeng
Copy link

same problem

@jandrew44
Copy link
Author

I have managed to solve it by the workaround mentioned here:
react-dnd/react-dnd#186

Still I am not happy to have direct dependencies "react-dnd" and "react-dnd-html5-backend".
Would prefer react-arborist to handle it by adding DndProvider wrappers internally.

@jameskerr
Copy link
Member

Glad you have a workaround. The next version of react-arborist will depend on react-aria's use-drag/drop hooks rather than the aging react-dnd. These issues should not longer be a problem.

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

No branches or pull requests

3 participants