Skip to content

bhyoo99/Horizontal-scroll-react-native-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Horizontal-scroll-react-native-web

This repository is based, inspired on this gist

ScrollViews with react-native-web let mobile devices drag to scroll, and let you use your mac trackpad on desktop.

But we need to support the most perfect pointer, the mouse.

'Official answer to the horizontal scroll on the react-native-web. :('

For horizontal scrollable content, such as carousels, I often find myself wanting to just wheel scroll with my mouse.

This gist provides a simple hook that makes your ScrollView horizontal Wheelable without press "shift".

It hasn't been tested with pagingEnabled on FlatLists, but it should work for normal a FlatList on web.

Warning

This won't work with react@17 because it uses findNodeHandle. Maybe try it without that and see if it still works? I haven't tried yet.

How to Make hook

Check this code

How to Use hook

Check this code

About

HowTo for make horizontal scroll view on react-native-web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published