Open tboba opened 1 month ago
The Expo app for the example from this branch is ready!
Name | Link |
---|---|
Latest commit | 7636fe4f1f67f1326d6e76bc3734d2bc3ca0aa37 |
Latest deploy log | https://app.netlify.com/sites/react-navigation-example/deploys/6644b80472b56d00077616c2 |
Deploy Preview | https://deploy-preview-11943--react-navigation-example.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Looks like CIs are failing because of type interference from Typescript 🤔 lemme fix that quickly
Motivation
This PR intents to add implementation of custom screen transitions, recently added in react-native-screens. You can find more about this feature here.
Test plan
Go to the code of the native stack in example (NativeStack.tsx) and wrap whole navigator with (import from
react-native-screens/gesture-handler
). After that, usegoBackGesture
prop on the desired screen.Ready to paste code 🍝
```tsx import { Button, Text, useHeaderHeight } from '@react-navigation/elements'; import { type PathConfigMap, useTheme } from '@react-navigation/native'; import { createNativeStackNavigator, type NativeStackScreenProps, useAnimatedHeaderHeight, } from '@react-navigation/native-stack'; import * as React from 'react'; import { Animated, Platform, ScrollView, StyleSheet, View } from 'react-native'; import { COMMON_LINKING_CONFIG } from '../constants'; import { Albums } from '../Shared/Albums'; import { Article } from '../Shared/Article'; import { NewsFeed } from '../Shared/NewsFeed'; import { GestureDetectorProvider } from 'react-native-screens/gesture-handler'; export type NativeStackParams = { Article: { author: string } | undefined; NewsFeed: { date: number }; Albums: undefined; }; const linking: PathConfigMapPresentation
https://github.com/react-navigation/react-navigation/assets/23281839/cae36411-2715-4d0a-ab30-95db370fdc45