You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then there is a chance that when either Baz 1 or Baz 2 gets rendered, it's not draggable. I suspect that this has to do with the state changing and Draggable only applying to whichever gets the initial render.
This observation comes from about 2 hours of debugging... for context, in my project, state is actually passed into the Foo component and can be set outside of Foo. Baz 2 is a table of a lot of components, whose slow rendering may or may not have contributed to this inconsistent behavior.
I resolved the inconsistency by individually wrapping Baz1 and Baz2 like this:
If I have a component that looks like this:
Then there is a chance that when either
Baz 1
orBaz 2
gets rendered, it's not draggable. I suspect that this has to do with the state changing and Draggable only applying to whichever gets the initial render.This observation comes from about 2 hours of debugging... for context, in my project,
state
is actually passed into theFoo
component and can be set outside ofFoo
.Baz 2
is a table of a lot of components, whose slow rendering may or may not have contributed to this inconsistent behavior.I resolved the inconsistency by individually wrapping
Baz1
andBaz2
like this:Is this inconsistency specific to
react-draggable
or is it an expected behavior ofreact
?The text was updated successfully, but these errors were encountered: