Changing an element’s scrollLeft property in a functional component is ignored in React?
I am trying to scroll an element with mouse drag and I am facing a problem. When I try to change the value of an element’s scrollLeft
property it does not do anything and when I log the value it always stays at 0
.
I even tried to give scrollLeft
a value but it never changes from 0
.
This is the code I am trying to use :