注释出文档
https://www.shouce.ren/api/view/a/13232
类型断言
非空断言!

另外种写法
const tabRef = useRef<HTMLDivElement>(null!)
枚举类型as const 断言
cosnt 参考:字面推理


https://www.shouce.ren/api/view/a/13232

另外种写法
const tabRef = useRef<HTMLDivElement>(null!)
cosnt 参考:字面推理


让时间为你证明