In earlier versions, the library used
ScrollView on iOS and
ViewPagerAndroid on Android to provide smooth animations and gestures. While this provided a close to native experience, there were too many differences between the implementations between 2 platforms which made things inconsistent and hard to maintain. In addition,
ScrollView was difficult to work with.
This new 2.0 version includes a rewrite of the pager using react-native-gesture-handler and react-native-reanimated. This addresses many platform specific bugs and performance problems and makes the library easier to maintain.
Due to the use of
reanimated as opposed to React Native’s
AnimatedAPI, this release is not backward compatible. However, I have tried my best to keep the API mostly unchanged for an easier upgrade path. If you’ve been using the components provided by the library, the migration will require minimal changes.
renderPagerprop is removed in favor of a single cross-platform pager.
animationEnabledprop is removed as it doesn’t make much sense in the scope of this library.
canJumpToTabprop is removed as it’s not straightforward to implement with decent UX.
onAnimationEndprop has been removed (if you need it, PR welcome to add it back).
positionprop received by the various
renderXcallbacks are now reanimatednodes.
renderSceneprop doesn’t receive
navigationStateanymore as screens rendered in
renderSceneshould not rely on the navigation state for performance. You can still pass the navigation state explicitly.
react-native-websupport is dropped because reanimated doesn’t support it.
inactiveColorto customize the label and icon colors.
contentContainerStyleprop to TabBar.
lazyprop to defer rendering unfocused scenes.