Skip to content

Commit 5b9a862

Browse files
authored
feat: Remove native-stack v5 from screens repo (#3433)
## Description This PR removes native-stack directory from screens repo. This dir held the code for native-stack v5, which has been moved to react-navigation and is v7, v8 now. The rest of the deprecated imports are removed and the unused code is deleted. Closes software-mansion/react-native-screens-labs#589 ## Changes Removed native-stack/*, fixed imports. ## Test code and steps to reproduce Check if the library still builds successfully.
1 parent 72e4864 commit 5b9a862

23 files changed

+79
-2648
lines changed

apps/src/tests/TestScreenAnimationV5.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
55
import {
66
NativeStackNavigationProp,
77
createNativeStackNavigator,
8-
} from 'react-native-screens/native-stack'
8+
} from '@react-navigation/native-stack'
99
import { GestureDetectorProvider } from 'react-native-screens/gesture-handler';
1010

1111
type StackParamList = {

apps/src/tests/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ export { default as Test3379 } from './Test3379';
166166
export { default as Test3422 } from './Test3422';
167167
export { default as Test3425 } from './Test3425';
168168
export { default as TestScreenAnimation } from './TestScreenAnimation';
169-
export { default as TestScreenAnimationV5 } from './TestScreenAnimationV5';
169+
// The following test was meant to demo the "go back" gesture using Reanimated
170+
// but the associated PR in react-navigation is currently put on hold
171+
// export { default as TestScreenAnimationV5 } from './TestScreenAnimationV5';
170172
export { default as TestHeader } from './TestHeader';
171173
export { default as TestPreload } from './TestPreload';
172174
export { default as TestActivityStateProgression } from './TestActivityStateProgression';

native-stack/README.md

Lines changed: 0 additions & 867 deletions
This file was deleted.

native-stack/package.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/gesture-handler/constraints.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { ScreenTransition } from 'react-native-reanimated';
21
import {
2+
ScreenTransition,
33
AnimatedScreenTransition,
44
GoBackGesture,
5-
PanGestureHandlerEventPayload,
6-
} from '../native-stack/types';
5+
} from 'react-native-reanimated';
76
import { AnimationForGesture } from './defaults';
8-
import { GestureUpdateEvent } from 'react-native-gesture-handler';
7+
import {
8+
GestureUpdateEvent,
9+
PanGestureHandlerEventPayload,
10+
} from 'react-native-gesture-handler';
911

10-
const SupportedGestures = [
12+
const SupportedGestures: GoBackGesture[] = [
1113
'swipeRight',
1214
'swipeLeft',
1315
'swipeDown',

src/native-stack/contexts/GHContext.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/native-stack/index.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/native-stack/navigators/createNativeStackNavigator.tsx

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)