未验证 提交 5e85ce47 编写于 作者: T Tom Xu 提交者: GitHub

chore: improve useCombinedRefs (#27352)

上级 96bb0cf2
...@@ -4,7 +4,7 @@ import { fillRef } from '../ref'; ...@@ -4,7 +4,7 @@ import { fillRef } from '../ref';
function useCombinedRefs<T>( function useCombinedRefs<T>(
...refs: Array<React.MutableRefObject<T> | ((instance: T) => void) | null> ...refs: Array<React.MutableRefObject<T> | ((instance: T) => void) | null>
) { ) {
const targetRef = React.useRef(); const targetRef = React.useRef<T>();
React.useEffect(() => { React.useEffect(() => {
refs.forEach(ref => { refs.forEach(ref => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册