Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: rename customAnimationOnGesture to animationMatchesGesture (#1…
…1228) **Motivation** This PR renames `customAnimationOnGesture` native-stack prop to `animationMatchesGesture` for `react-navigation` v7. `customAnimationOnGesture` makes you think this prop takes an object with an animation provided by the developer. In reality, it's just a boolean flag that `animationMatchesGesture` name reflects better. **Test plan** <details> <summary>Code example</summary> <br> ```jsx import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import * as React from 'react'; import { Button, Text, View } from 'react-native'; function HomeScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: 'papayawhip', }} > <Text>Home Screen</Text> <Button title="Go to Details" onPress={() => navigation.navigate('Details')} /> </View> ); } function DetailsScreen() { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: 'tomato', }} > <Text>Details Screen</Text> </View> ); } const Stack = createNativeStackNavigator(); function App() { return ( <NavigationContainer> <Stack.Navigator initialRouteName="Home"> <Stack.Screen name="Home" component={HomeScreen} /> <Stack.Screen name="Details" component={DetailsScreen} options={{ animation: 'fade_from_bottom', animationMatchesGesture: true, }} /> </Stack.Navigator> </NavigationContainer> ); } export default App; ``` </details> https://user-images.githubusercontent.com/39658211/219395884-bcfa7905-539a-4ec9-a1e3-d5a5dd23fe42.mov
- Loading branch information