Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

v1.0.0

Compare
Choose a tag to compare
@satya164 satya164 released this 01 Jun 21:43
· 247 commits to main since this release

Breaking changes

  • Rename exports to simplify the names:
    • TabViewAnimated -> TabView
    • TabViewPagerPan -> PagerPan
    • TabViewPagerScroll -> PagerScroll
    • TabViewPagerAndroid -> PagerAndroid
    • TabViewPagerExperimental -> PagerExperimental
  • Export Flow types from the main file, so instead of importing types from react-native-tab-view/types, you can now import them from react-native-tab-view directly:
    • import type { Route } from 'react-native-tab-view/types' -> import { TabView, type Route } from 'react-native-tab-view'
  • Remove deprecated jumpToIndex prop in favor of jumpTo:
    • jumpToIndex(2) -> jumpTo('albums')
  • Remove renderHeader and renderFooter in favor of renderTabBar and tabBarPosition ('top' | 'bottom').
  • Render a tab bar by default. To remove the tab bar, use renderTabBar={() => null}
  • Don't pass focused and index properties in the scene object. If you were using them earlier, you can use routes.indexOf(route) to get the index and compare it with the current index to get the focused state.
  • canJumpToTab now receives an object containing a route property instead of the route directly to make it consistent with other props.

New features

  • Add new props for accessibility: getAccessible and getAccessibilityLabel to TabBar.
  • Add a getTestID prop to TabBar and pagers.
  • Make it possible to use SceneMap inside your component's render function.
  • Export PagerDefault which renders appropriate pager according to the platfrom.