Updating React State in React Window.AddEventListener

前端 未结 0 508
臣服心动
臣服心动 2021-01-31 04:38

I have the following problem: I want to update a state when a scroll is happening.

I used the following solution:

React.useEffect(() => { window.addEven         


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