typescript遇到refs.current可能为null

源码:
image.png

错误提示:
image.png

请问如何修正

阅读 7k
1 个回答

const rangeUI = useRef<HTMLDivElement>(null)

推荐问题