This repository has been archived by the owner on Nov 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use gesture handler and reanimated for performance
BREAKING CHANGE: this removes some props which are difficult/impossible to implement with reanimated, and requires linking [react-native-gesture-handler](https://github.com/kmagiera/react-native-gesture-handler) and [react-native-reanimated](https://github.com/kmagiera/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` and `onAnimationEnd` have been removed (if you have ideas on how to implement these, happy to add them back) - The `position` prop received by the `renderTabBar` and `renderScene` are now [reanimated](https://github.com/kmagiera/react-native-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
- Loading branch information
Showing
45 changed files
with
3,929 additions
and
4,763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,3 @@ workflows: | |
- lint-and-flow: | ||
requires: | ||
- install-dependencies | ||
- unit-tests: | ||
requires: | ||
- install-dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
## Run the example | ||
# Run the example | ||
|
||
- [View it with Expo](https://expo.io/@satya164/react-native-tab-view-demos) | ||
- Run the example locally | ||
+ Clone the repository and `cd` to this directory | ||
+ Run `yarn` to install the dependencies | ||
+ Run `yarn start` to start the packager | ||
+ Scan the QR Code with the Expo app | ||
- Clone the repository and `cd` to this directory | ||
- Run `yarn` to install the dependencies | ||
- Run `yarn start` to start the packager | ||
- Scan the QR Code with the Expo app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
|
||
const path = require('path'); | ||
const blacklist = require('metro-config/src/defaults/blacklist'); | ||
const pak = require('../package.json'); | ||
const escape = require('escape-string-regexp'); | ||
|
||
const peerDependencies = Object.keys(pak.peerDependencies); | ||
|
||
module.exports = { | ||
projectRoot: __dirname, | ||
watchFolders: [path.resolve(__dirname, '..')], | ||
|
||
resolver: { | ||
blacklistRE: blacklist([ | ||
new RegExp( | ||
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$` | ||
), | ||
new RegExp( | ||
`^${escape( | ||
path.resolve(__dirname, '..', 'docs', 'node_modules') | ||
)}\\/.*$` | ||
), | ||
]), | ||
|
||
providesModuleNodeModules: ['@babel/runtime', ...peerDependencies], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.