Issue
I want to use scrollTo https://reactjsexample.com/scroll-to-a-position-in-react but I need an onClick in order to do so. I also want to place it inside a Text and I can only use onPress. While I could create a View, it would not have the same visual effect, I want the hand cursor to show up when I am hovering over the View. Does anyone know how to use ScrollTo with onPress or how to have the hand above the view?
Solution
To have the hand over the input you can use css styles, it's very simple to do, just place this in your StyleSheet:
cursor: pointer;
In order to use ScrollTo you just have to follow the tutorial that you linked. If you want to do it for react-native then you won't be able to have the hand icon but to scroll you would use the reanimated library and do something like this: https://docs.swmansion.com/react-native-reanimated/docs/api/nativeMethods/scrollTo/
Answered By - no-display
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.