streamich/react-use
View on GitHubuseEnsuredForwardedRef not working with callback refs
Open
#805 opened on Nov 26, 2019
bughelp wanted
Repository metrics
- Stars
- (43,979 stars)
- PR merge metrics
- (Avg merge 1743d 9h) (1 merged PR in 30d)
Description
If the forwarded ref is a callback ref the callback isn't called properly.
useEnsuredForwardedRef should check if the passed ref is a callback-function and if that's the case call it to set the ref.