Categories
Uncategorized

React-Native Viewpager

Android has a view called a “viewpager”. It’s sort of like iOS PageViewController. There are several efforts to bring this to react-native as a cross-platform solution. rn-viewpager is now abandoned, even though it worked great. react-native-app-intro-slider is interesting, but seems special purpose for doing welcome screens — it doesn’t allow other interesting use cases because it seems to assume it’s always the full width of the device window. react-native-viewpager is another one but it’s Android only.

One that seems often overlooked is good old tabview. This can be customized so that the tabs themselves look like paging dots and it already has a nice “viewpager” style animation.

So next time you’re googling for react-native viewpager, maybe consider tabview as an easy solution. It’s well supported by the community and doesn’t have as big a risk of being orphaned like rn-viewpager was.