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
Thanks for the report! Now that React provides a ref forwarding API this is definitely something we could provide. If you wanted to take a stab at it I'd be happy to merge a PR :)
Oh this is an interesting bit from that post, however
When you start using forwardRef in a component library, you should treat it as a breaking change and release a new major version of your library.
That's a good point, if there are people relying on ref returning the instance of Sticky, changing this would break their application. I'm not sure the marginal improvement is worth a major version release at the moment.
I'm submitting a ...
If you're reporting a bug, please provide a minimal demonstration of the problem
What is the current behavior?
When rendering this Sticky element:
The
ref was called
is not printed.Since here the ref prop is overwritten.
What is the expected or desired behavior?
I expect to be able to get a ref to my
<div/>
Why do you want this? What use case do you have?
I might need something other than the supplied 'calculatedHeight`.
What is your environment?
6.0.3
Chrome
The text was updated successfully, but these errors were encountered: