Property 'current' does not exist on type '((instance: HTMLDivElement | null) => void) | RefObject'

前端 未结 0 766
耶瑟儿~
耶瑟儿~ 2021-01-25 05:44

Usually when I use React + Typescript and I have to work with refs I usually use this check:

const ref = useRef(null)
...
if(ref &&          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题