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

Invariant Violation: Expected targetIds to be registered #3224

Closed
valtism opened this issue Jun 2, 2021 · 4 comments
Closed

Invariant Violation: Expected targetIds to be registered #3224

valtism opened this issue Jun 2, 2021 · 4 comments

Comments

@valtism
Copy link

valtism commented Jun 2, 2021

Describe the bug
When using create-react-app, every time a hot reload occurs an invariant exception is thrown.

Reproduction

Live Reproduction

Steps to reproduce the behavior:

  1. Change the colour of a drag or drop box
  2. Try to drag
  3. Error occurs

Expected behavior
No error thrown, somehow handle hot-reloading properly.

Desktop (please complete the following information):

  • OS: macOS 11.3
  • Browser Safari 14.1
  • Version 14.0.2
@valtism
Copy link
Author

valtism commented Jun 2, 2021

Related discussion (marked as stale) #763

@dreamyguy
Copy link

Just wanted to mention that I get this error with a stripped-down example from DnD itself, on a NextJS app. https://react-dnd.github.io/react-dnd/examples/sortable/simple

@hlz
Copy link

hlz commented Jul 9, 2021

I'm also having this issue with a fairly simple Next.js app. Dragging after a hot reload throws the error.

@valtism
Copy link
Author

valtism commented Sep 27, 2021

This seems to be fixed in v14.0.4 🎉

@valtism valtism closed this as completed Sep 27, 2021
megawebmaster added a commit to megawebmaster/react-dnd that referenced this issue Dec 20, 2021
This commit backports fix for 14.0.4 that disconnects source,
target and preview connectors on component unmount.
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