├── .gitignore ├── App.js ├── README.md ├── app.json ├── package.json ├── src ├── App.tsx ├── TransitionConfigs │ ├── CardStyleInterpolators.tsx │ ├── HeaderStyleInterpolators.tsx │ ├── TransitionPresets.tsx │ └── TransitionSpecs.tsx ├── assets │ ├── back-icon-mask.png │ ├── back-icon.png │ ├── back-icon@1.5x.android.png │ ├── back-icon@1.5x.ios.png │ ├── back-icon@1x.android.png │ ├── back-icon@1x.ios.png │ ├── back-icon@2x.android.png │ ├── back-icon@2x.ios.png │ ├── back-icon@3x.android.png │ ├── back-icon@3x.ios.png │ ├── back-icon@4x.android.png │ └── back-icon@4x.ios.png ├── components │ ├── BorderlessButton.tsx │ ├── Card.tsx │ ├── Header │ │ ├── HeaderAnimated.tsx │ │ ├── HeaderBackButton.tsx │ │ ├── HeaderBar.tsx │ │ ├── HeaderSegment.tsx │ │ ├── HeaderSimple.tsx │ │ └── HeaderTitle.tsx │ ├── Stack.tsx │ └── TouchableItem.tsx ├── types.tsx └── utils │ └── memoize.tsx ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | node_modules 4 | .expo 5 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | export { default } from './src/App.tsx' 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reanimated Stacks 2 | 3 | Experiment trying to re-implement react navigation stack with reanimated and gesture-handler. 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "reanimated-stacks", 4 | "description": "No description", 5 | "slug": "snack-BJ9M8a6jV", 6 | "privacy": "unlisted", 7 | "sdkVersion": "32.0.0", 8 | "version": "1.0.0", 9 | "orientation": "portrait", 10 | "primaryColor": "#cccccc", 11 | "icon": "https://d1wp6m56sqw74a.cloudfront.net/~assets/c9aa1be8a6a6fe81e20c3ac4106a2ebc", 12 | "loading": { 13 | "icon": "https://d1wp6m56sqw74a.cloudfront.net/~assets/c9aa1be8a6a6fe81e20c3ac4106a2ebc", 14 | "hideExponentText": false 15 | }, 16 | "packagerOpts": { 17 | "assetExts": [ 18 | "ttf", 19 | "mp4", 20 | "otf", 21 | "xml" 22 | ] 23 | }, 24 | "ios": { 25 | "supportsTablet": true 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reanimated-stacks", 3 | "version": "0.0.0", 4 | "description": "No description", 5 | "author": null, 6 | "private": true, 7 | "main": "node_modules/expo/AppEntry.js", 8 | "scripts": { 9 | "typescript": "tsc --noEmit" 10 | }, 11 | "dependencies": { 12 | "expo": "^32.0.0", 13 | "react": "16.5.0", 14 | "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz", 15 | "react-native-paper": "2.2.8" 16 | }, 17 | "devDependencies": { 18 | "@types/expo": "^32.0.13", 19 | "@types/react": "^16.8.16", 20 | "@types/react-native": "^0.57.51", 21 | "typescript": "^3.4.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { View, Text, Button, StyleSheet } from 'react-native'; 3 | import Stack, { SceneProps } from './components/Stack'; 4 | import { Route } from './types'; 5 | import { DefaultTransition } from './TransitionConfigs/TransitionPresets'; 6 | 7 | type State = { 8 | routes: Route[]; 9 | initialRoutes: string[]; 10 | closingRoutes: string[]; 11 | }; 12 | 13 | export default class App extends React.Component<{}, State> { 14 | state: State = { 15 | routes: [{ key: '0' }, { key: '1' }], 16 | initialRoutes: ['0', '1'], 17 | closingRoutes: [], 18 | }; 19 | 20 | private key = 2; 21 | 22 | private renderScene = ({ route, index }: SceneProps) => { 23 | return ( 24 | 25 | {index} 26 | 27 |