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
When we upgraded to version 0.11.0 we (h/t @andyyu, the eng on our team who found the issue) noticed that some core app behavior changed and upon digging in, we discovered that it was related to changes in behavior around the attachTo prop. If no attachTo prop is provided, it will clone the children passed in and swap in a new ref (code).
We had code that relied on the fact that the refs would not be swapped out. The culprit PR is #76. Can you advise on how we should be using the API after this change to the behavior? If we want to avoid having children be cloned, how should we be utilizing the attachTo prop? From reading the code, it wasn't clear how to get the behavior we'd like.
Thanks in advance for the assistance!
The text was updated successfully, but these errors were encountered:
Yeah unfortunately I realized later after building this library that using cloneElement is very dangerous for exact that reason.
In your case I would suggest to start using attachTo so you can pass the ref you need somewhere else to this lib. That's the only way to work around this issue.
When we upgraded to version 0.11.0 we (h/t @andyyu, the eng on our team who found the issue) noticed that some core app behavior changed and upon digging in, we discovered that it was related to changes in behavior around the
attachTo
prop. If noattachTo
prop is provided, it will clone thechildren
passed in and swap in a new ref (code).We had code that relied on the fact that the refs would not be swapped out. The culprit PR is #76. Can you advise on how we should be using the API after this change to the behavior? If we want to avoid having
children
be cloned, how should we be utilizing theattachTo
prop? From reading the code, it wasn't clear how to get the behavior we'd like.Thanks in advance for the assistance!
The text was updated successfully, but these errors were encountered: