why is typescript complaining when trying to use ref in react?

后端 未结 0 1345
星月不相逢
星月不相逢 2021-01-22 13:11

I am using ref to animate elements on scroll.

  const foo = () => {
    if (!ref.current) return;
    const rect = ref.current.getBoundingClientRect();
    set         


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