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
Do you want to request a feature or report a bug? Feature
What is the current behavior?
The ref attribute passed to a DOM node can be either a callback or a RefObject, but not both. Sometimes, that's exactly what's required: for example, a library like react-pose demands ref forwarding to work with a React Component, but you'd also like to retain a reference to the same parent DOM node within that component itself for a different reason. It's often not possible to nest DOM nodes to achieve a similar thing using two different ref attributes as that breaks layout.
I'm not surprised this doesn't work as there's no reason for the parent ref callback to fire, but I don't know how else to go about it.
What is the expected behavior?
The callback provides the component with its own reference to the parent DOM node, whilst also providing it to the parent component via the passed RefObject.
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug? Feature
What is the current behavior?
The
ref
attribute passed to a DOM node can be either a callback or aRefObject
, but not both. Sometimes, that's exactly what's required: for example, a library like react-pose demands ref forwarding to work with a React Component, but you'd also like to retain a reference to the same parent DOM node within that component itself for a different reason. It's often not possible to nest DOM nodes to achieve a similar thing using two different ref attributes as that breaks layout.Here's a link to a naive attempt to achieve this: https://codesandbox.io/s/4jyw3q3v57
I'm not surprised this doesn't work as there's no reason for the parent ref callback to fire, but I don't know how else to go about it.
What is the expected behavior?
The callback provides the component with its own reference to the parent DOM node, whilst also providing it to the parent component via the passed
RefObject
.The text was updated successfully, but these errors were encountered: