streamich/react-use

useEnsuredForwardedRef not working with callback refs

Open

#805 opened on 2019年11月26日

GitHub で見る
 (2 comments) (1 reaction) (0 assignees)TypeScript (3,273 forks)batch import
bughelp wanted

Repository metrics

Stars
 (43,979 stars)
PR merge metrics
 (平均マージ 1743d 9h) (30d で 1 merged PR)

説明

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.

コントリビューターガイド