Skip to content

Commit

Permalink
Screen transition example update - use proper import from screens ins…
Browse files Browse the repository at this point in the history
…tead of mock (#6118)

## Summary

After release of `react-native-screens` we can remove temporary mock
from example app and use proper import from rn-screens.

I had to make modifications to
`UIViewControllerBasedStatusBarAppearance` because we are using the
native stack from `rn-screens` until the changes are upstreamed to
`react-navigation` - [Pull Request
Link](react-navigation/react-navigation#11943)

## Test plan

Run screen transition example in example app.
  • Loading branch information
piaskowyk authored Jun 13, 2024
1 parent 793a4ec commit a7afaca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions apps/common-app/src/examples/ScreenTransitionExample.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-nocheck - It will be removed after release of react-native-screens, because currently 'react-native-screens/gesture-handler' import doesn't exist.
import React from 'react';
import { View, StyleSheet, Button } from 'react-native';
import {
Expand All @@ -10,12 +9,7 @@ import {
ScreenTransition,
AnimatedScreenTransition,
} from 'react-native-reanimated';

// This is a temporary workaround until react-native-screens release with 'react-native-screens/gesture-handler' import.
// import { GestureDetectorProvider } from 'react-native-screens/gesture-handler';
function GestureDetectorProvider({ children }) {
return children;
}
import { GestureDetectorProvider } from 'react-native-screens/gesture-handler';

function MainScreen({ navigation }: NativeStackScreenProps<ParamListBase>) {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/fabric-example/ios/FabricExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion apps/paper-example/ios/ReanimatedExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<true/>
</dict>
</plist>

0 comments on commit a7afaca

Please sign in to comment.