useEffect 이용한 스크롤에 따른 이벤트제어

코드깎는 노인·2020년 5월 7일
0
    function watchScroll() {
      window.addEventListener("scroll", setPayResultPosition);
    }
    watchScroll();
    return () => {
      window.removeEventListener("scroll", setPayResultPosition);
    };
  });```
profile
내가 볼려고 만든 블로그

0개의 댓글