-
I've been trying to implement the initial scroll from https://codesandbox.io/s/react-indiana-drag-scroll-initial-scroll-getelement-99o6q?file=/index.js:317-382 But haven't had much luck getting the ref to work it seems, or perhaps it is something with the render cycle. Here is my code to reference with the codesandbox:
Thanks for any help in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
@dnh33, I can't answer on your question without additional details. As you can see, the code works in the sandbox, so it's not the library issue. But I can assume, that the |
Beta Was this translation helpful? Give feedback.
@dnh33, I can't answer on your question without additional details. As you can see, the code works in the sandbox, so it's not the library issue.
But I can assume, that the
ProjectData
(why its first letter is capital, by the way) is loaded after theProjectCarousel
mounted. Try to setProjectData
as the dependency ofuseEffect
for the test purpose.