Get div's offsetTop positions in React
问题 I am trying to implement a List view in React. What I am trying to achieve is that to store the list headers informations and register the components and register the scroll event. every time when user scroll the window, I'd like to take out the stored div and re-calculate the offsetTop data. The problem now is that, I found the console just print out the initial value (the value is fixed and never changed) offsetTop data never change in onscroll function. Anyone suggest how to get latest