Not getting callback after adding an event listener for scroll event in React.js

前端 未结 3 1916
说谎
说谎 2021-02-19 09:38

I followed the instruction from this post Update style of a component onScroll in React.js to register event listener for scroll event.

I have a React component that ren

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 10:07

    Thank you dannyjolie - this work

    elementScrollData = (value) => {
      console.log('elementScrollData ', value);
    } 
    return (
          
    Scroll element
    ); }

提交回复
热议问题