-
Notifications
You must be signed in to change notification settings - Fork 311
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
onCanvasDrop creates two nodes #122
Comments
Yes I was experiencing the same issue. When structuring my components differently from the examples, the on Node Dropped event is called 2 times. |
What do you suggest the solution to this is? |
@MrBlenny |
@MrBlenny I noticed the error occurring when I started to useContext() for the state of my graph according to this example. When I used this model for the state of the graph, I couldn't figure out how to update the state of the graph from the node, but I did not experience this error. |
because of React.StrictMode setState updaters will run twice in strict mode in development, This causes a double call to onCanvasDrop function and create double node
The text was updated successfully, but these errors were encountered: