'Persist scroll position across functional component re-render

Is there a mechanism to persist the scroll-position of a "function component".. let's call it "Table" ..using any (or a combination) of the hooks introduced from React v.16.8?

The component is likely updated every X seconds by a new batch of data and at least keeping the horizontal scroll position would definitely enhance the User Experience.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source