This repository has been archived by the owner on Nov 27, 2022. It is now read-only.
Releases: satya164/react-native-tab-view
Releases · satya164/react-native-tab-view
Release 2.0.0-alpha.2
Bug Fixes
- fix tapping on tab sometimes didn't switch (e91a5b2)
Release 2.0.0-alpha.1
Features
- add
activeColor
andinactiveColor
to customizethe label (18cc82a)
Release 2.0.0-alpha.0
Features
- use gesture handler and reanimated for performance (451435a)
BREAKING CHANGES
This version removes some props which are difficult/impossible to implement with reanimated,
and requires linking react-native-gesture-handler
and react-native-reanimated
List of breaking changes:
- The
renderPager
prop is removed. Now there's only one pager implemented with gesture handler. - The
animationEnabled
prop is removed. It's not straightforward to implement, and doesn't make much sense in the scope of this library. - The
canJumpToTab
prop is removed - Few props such as
onSwipeStart
,onSwipeEnd
andonAnimationEnd
have been removed (if you have ideas on how to implement these, happy to add them back) - The
position
prop received by therenderTabBar
andrenderScene
are now reanimated nodes, so you'll need to migrate your custom tab bar to use reanimated. This should mostly be straightforward. - No react-native-web support because both gesture handler and reanimated are native deps. I can implement the pager with pan responder for web, but can't do much for reanimated
Release 1.3.2
Release 1.3.1
Release 1.3.0
v1.0.0
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 fromreact-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 ofjumpTo
:jumpToIndex(2)
->jumpTo('albums')
- Remove
renderHeader
andrenderFooter
in favor ofrenderTabBar
andtabBarPosition
('top' | 'bottom'
). - Render a tab bar by default. To remove the tab bar, use
renderTabBar={() => null}
- Don't pass
focused
andindex
properties in thescene
object. If you were using them earlier, you can useroutes.indexOf(route)
to get the index and compare it with the current index to get the focused state. canJumpToTab
now receives an object containing aroute
property instead of theroute
directly to make it consistent with other props.
New features
- Add new props for accessibility:
getAccessible
andgetAccessibilityLabel
toTabBar
. - Add a
getTestID
prop toTabBar
and pagers. - Make it possible to use
SceneMap
inside your component's render function. - Export
PagerDefault
which renders appropriate pager according to the platfrom.
v0.0.74
v0.0.73
Breaking changes
- Drop
lazy
prop- It didn't work great with more than 2 tabs
- It's not very performant to listen to all events during the gestures since we're trying to move away towards native gestures
- It triggered a re-render of the whole tab view mid-gesture, which causes jank
If you used the prop, you should change the approach to loading a placeholder screen by default and switching to full view when you screen gets focus.
- Drop position listeners, they are bad for performance since we're moving to native gestures, and there's no straightforward way to implement them with the new approach. Please stay on older version if you need it.
Bug fixes
- Fix calculating initial offset for tab bar
v0.0.72
Breaking changes
- Refactor all pagers to be able to move towards native gestures, might introduce new regressions
- When declaring flow type for route, you now need to import the
Route
type and define likeRoute<{ key: string }>
New features and enhancements
- Improve ripple effect in tab bar - @bsonntag
- Use
keyboardShouldPersistTaps="handled"
in tab bar - Add support for gesture-handler with
TabViewPagerExperimental
Bug fixes
- Rework scrollable tabs logic to improve coordination
- Add safety check while removing listener - @mujavidb
- Add keys to scenes to prevent remounting (#399)
Known issues
- Lazy loading is broken on Android
- Tab items with custom width are buggy on iOS